admin 管理员组文章数量: 887021
2023年12月18日发(作者:oracle的用户名和密码怎么看)
S机房设备维护管理系统V1.0
1
using System;
using ;
using uration;
using tions;
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
using iserManager;
using component;
{
FranchiserManager dllFranchiserManager = new
FranchiserManager();
Common com = new Common();
public string worning = "";
protected void Page_Load(object sender, EventArgs e)
{
try
{
//得到当前机房日常维护信息
string path = h("~/admin/");
DataSet objDataSet = new DataSet();
l(path);
worning = [0].Rows[0][0].ToString();
if (Session["FranchiserId"] == null ||
Session["FranchiserId"].ToString().Length == 0)
{
ct("");
}
#region
if (!IsPostBack)
{
#region 计算流量
double countwardall = 0;
nchisercountaward(Session["FranchiserId"].ToString());
//得到所有的流量结果
DataTable countwardtable =
ntAwardnotebyfid(Session["FranchiserId"].ToString())
foreach (DataRow dr in )
{
countwardall +=
le(dr["award"].ToString());
}
#endregion
= ng();
bindgetandset();
//计算流量总数
DataTable table =
ersandOrdersADDByuserid(Session["FranchiserId"].ToString(), 3);
double getcount = 0;
double sendcount = 0;
foreach (DataRow dr in )
S机房设备维护管理系统V1.0
2
{
getcount += le(dr["AddCount"]);
sendcount += le(dr["Subcount"]);
}
= ng();
= ng();
}
#endregion
}
catch(ion ex)
{
(ng());
}
}
///
/// 流量统计
///
void Bindcoungv()
{
DataTable table =
ntAwardnoteallbyfid(Session["FranchiserId"].ToString());
urce = table;
nd();
e = false;
e = false;
e = true;
}
///
/// 查询流量
///
void bindgetandset()
{
//得到控制机房的所有当前流量
DataTable table =
ersandOrdersADDByuserid(Session["FranchiserId"].ToString(), 0);//
ersByFranchiserId(Session["webuserid"].ToString());
urce = table;
nd();
e = true;
e = false;
e = false;
}
///
/// 绑定当前数据
///
void bindset()
{
DataTable table =
ersandOrdersADDByuserid(Session["FranchiserId"].ToString(), 0);//
ersByFranchiserId(Session["webuserid"].ToString());
urce = table;
nd();
S机房设备维护管理系统V1.0
3
e = false;
e = true;
e = false;
}
///
/// 数据流量
///
///
///
protected void Button1_Click(object sender, EventArgs e)
{
bindgetandset();
}
//数据
protected void gvget_PageIndexChanging(object sender,
GridViewPageEventArgs e)
{
dex = eIndex;
bindgetandset();
}
//当前
protected void gvsend_PageIndexChanging(object sender,
GridViewPageEventArgs e)
{
dex = eIndex;
bindset();
}
protected void gvcount_PageIndexChanging(object sender,
GridViewPageEventArgs e)
{
dex = eIndex;
Bindcoungv();
}
protected void Button3_Click(object sender, EventArgs e)
{
Bindcoungv();
}
//当前
protected void Button2_Click(object sender, EventArgs e)
{
bindset();
}
}
using System;
using ;
using uration;
using tions;
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
using iserManager;
using useManager;
using component;
using COMP;
S机房设备维护管理系统V1.0
4
{
Cart = new ();
nfo dllPhoneInfo = new
nfo();
FranchiserManager dllFranchiserManager = new
FranchiserManager();
int intID = ;
Cart sysCart = new Cart();
Common com = new Common();
UserInfo SysUserInfo = new UserInfo(); nfo
sysPhoneInfo = new nfo();
public string worning = "";
protected void Page_Load(object sender, EventArgs e)
{
//得到当前机房温度统计结果
string path = h("~/admin/");
DataSet objDataSet = new DataSet();
l(path);
worning = [0].Rows[0][0].ToString();
if (Session["FranchiserId"] == null ||
Session["FranchiserId"].ToString().Length == 0)
{
ct("");
}
if (!IsPostBack)
{
if (intID != null && intID != 0)
{
DataTable table =
veByID(nfo, ng());
Decimal PriceS =
mal([0]["PriceVipY"].ToString());
Decimal PriceVipY =
mal([0]["PriceVipY"].ToString());
int productID = intID;
string cartNum = m;
int PCount = 1;
DateTime AddTime = ;
Decimal subTotal = PriceVipY * PCount;
int UserId = 0;
UserId =
(Session["FranchiserId"].ToString());
bool b = _Cart(productID, cartNum);
if (b == true)
{
int intFlag = _Cart(0, productID,
cartNum, PCount, AddTime, subTotal, UserId, "");
if (intFlag <= 0)
{
("操作失败!");
ory(-1);
}
}
}
BindGridView();
}
}
protected void BindGridView()
S机房设备维护管理系统V1.0
5
{
Count =
neInfoAllCount();
DataSet ds =
neInfoAll(tPageIndex, ze);
urce = ds;
nd();
double SumAll = 0;
DataTable table =
tByCartNum(m);
if ( > 0)
{
for (int i = 0; i < ; i++)
{
string ProductId = [i].Cells[0].Text;
bool b = false;
foreach (DataRow dr in )
{
if (dr["ProductID"].ToString().Trim() ==
())
{
TextBox tb =
(TextBox)[i].Cells[4].FindControl("txtCount");
= dr["PCount"].ToString();
Label lb =
(Label)[i].Cells[5].FindControl("lbSum");
= dr["subTotal"].ToString();
b = true;
}
}
if (!b)
{
TextBox tb =
(TextBox)[i].Cells[4].FindControl("txtCount");
= "0";
Label lb =
(Label)[i].Cells[5].FindControl("lbSum");
= "0";
}
}
foreach (DataRow dr in )
{
SumAll +=
le(dr["subTotal"].ToString());
= ng();
}
}
else
{
for (int i = 0; i < ; i++)
{
TextBox tb =
(TextBox)[i].Cells[4].FindControl("txtCount");
= "0";
}
= "0";
S机房设备维护管理系统V1.0
6
}
}
protected void AspNetPager1_PageChanging(object src,
angingEventArgs e)
{
tPageIndex = eIndex;
BindGridView();
}
///
///
///
///
protected void btnEdit_Click(object sender, EventArgs e)
{
int i = 0;
Button ib = (Button)sender;//获得当前控件
TableCell cell = (TableCell);//得到所处的父单元格
GridViewRow iRow = (GridViewRow);//得到所处父单元行
i = ex;//得到该行的索引
int ProductId =
32([i].Cells[0].());//得到单元格里文本值
string CartNum = m;
TextBox tb =
(TextBox)[i].Cells[4].FindControl("txtCount");
string Count = ();
int PCount = 0;
try
{
PCount = 32(Count);
}
catch
{
("数量错误");
return;
}
double Price =
le([i].Cells[4].());
double subTotal = PCount * Price;
int UserId =
32(Session["FranchiserId"].ToString());
DataTable table =
tByCartNum(CartNum, ProductId);
if ( > 0)//更新数量
{
CartByCartNum(CartNum,
ProductId, PCount, subTotal);
Label lb =
(Label)[i].Cells[4].FindControl("lbSum");
= ng();
}
else//添加
{
if (subTotal > 0)
{
t(ProductId, CartNum,
S机房设备维护管理系统V1.0
7
PCount, subTotal, UserId);
Label lb =
(Label)[i].Cells[4].FindControl("lbSum");
= ng();
}
}
DataTable table1 =
tByCartNum(CartNum);
double SumAll = 0;
if ( > 0)
{
foreach (DataRow dr in )
{
SumAll = SumAll +
le(dr["subTotal"].ToString());
}
}
= ng();
}
///
/// 温度控制中心
///
///
///
protected void Button1_Click(object sender, EventArgs e)
{
ct("");
}
}
using System;
using ;
using uration;
using tions;
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
using iserManager;
using COMP;
{
FranchiserManager dllFranchiserManager = new
FranchiserManager();
protected void Page_Load(object sender, EventArgs e)
{
if (Session["FranchiserId"] == null ||
Session["FranchiserId"].ToString().Length == 0)
{
ct("");
}
else
{
DataTable table =
nchiserById(Session["FranchiserId"].ToString());
=
S机房设备维护管理系统V1.0
8
[0]["UserName"].ToString();
}
}
///
/// 退出
///
///
///
protected void LinkButton1_Click(object sender, EventArgs e)
{
Session["FranchiserId"] = null;
Session["MemberName"] = null;
Session["FranchiserName"] = null;
n["cartNum"] = null;
if (errer != null)
{
ct("");
}
else
{
ct("");
}
}
}
using System;
using ;
using uration;
using tions;
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
using iserManager;
using COMP;
{
FranchiserManager dllFranchiserManager = new
FranchiserManager();
public string worning = "";
protected void Page_Load(object sender, EventArgs e)
{
//得到当前结果
string path = h("~/admin/");
DataSet objDataSet = new DataSet();
l(path);
worning = [0].Rows[0][0].ToString();
if (Session["FranchiserId"] == null ||
Session["FranchiserId"].ToString().Length == 0)
{
ct("");
}
if (!IsPostBack)
{
BinProvinces();
ShowUser();
}
S机房设备维护管理系统V1.0
9
}
protected void ShowUser()
{
DataTable table =
nchiserById(Session["FranchiserId"].ToString());
=
[0]["UserName"].ToString();
=
[0]["UserEmail"].ToString();
=
[0]["UserPwdQuestion"].ToString();
=
[0]["CompanyName"].ToString();
=
[0]["CompanyProperty"].ToString();
=
[0]["Bankroll"].ToString();
edIndex =
f((ListItem)Text([0]["Province"].ToString()));
();
(0,
[0]["City"].ToString());
=
[0]["LoginAddress"].ToString();
=
[0]["OperrationUser"].ToString();
=
[0]["OperratonMobile"].ToString();
=
[0]["OperratonTel"].ToString();
=
[0]["OperratonEmail"].ToString();
= [0]["Fax"].ToString();
=
[0]["OfficeAddress"].ToString();
= [0]["Code"].ToString();
= [0]["TaxNum"].ToString();
= [0]["Bank"].ToString();
=
[0]["BankNum"].ToString();
=
[0]["Corporation"].ToString();
=
[0]["FinanceUser"].ToString();
=
[0]["FinanceTel"].ToString();
=
[0]["InvoiceInfo"].ToString();
=
[0]["InMailingAddress"].ToString();
=
[0]["InMailingCode"].ToString();
= [0]["InTel"].ToString();
=
[0]["InReceiver"].ToString();
=
S机房设备维护管理系统V1.0
10
[0]["MobileAddressMailing"].ToString();
=
[0]["MolileCodeMailing"].ToString();
=
[0]["Reveiver"].ToString();
=
[0]["RMobile"].ToString();
= [0]["RID"].ToString();
=
[0]["TableUser"].ToString();
=
[0]["TableRelation"].ToString();
= [0]["Email"].ToString();
= [0]["Point"].ToString();
// =
[0]["RegDate"].ToString();
if ([0]["LevelId"].ToString() == "0")
{
= "一般控制机房";
}
else
{
table =
nchiserLevelById([0]["LevelId"].ToString());
=
[0]["LevelName"].ToString();
}
}
///
/// 绑定
///
protected void BinProvinces()
{
DataTable ProTable =
Provinces();
foreach (DataRow dr in )
{
ListItem lt = new ListItem(dr["area_name"].ToString());
= dr["area_id"].ToString();
(lt);
}
(0, "请选择机器");
(0, "请选择机组");
}
protected void btn_Modify_Click(object sender, EventArgs e)
{
string Id = Session["FranchiserId"].ToString();
string Answer =
tPassword((), "MD5");
if (().Length == 0)
{
DataTable table =
nchiserById(Id);
Answer = [0]["UserAnswer"].ToString();
}
Franchiser ObjFranchiser = new Franchiser();
= (Id);
S机房设备维护管理系统V1.0
11
swer = Answer;
ail = ();
yName = ();
yProperty =
();
ll =
le(());
ce =
();
= ();
ddress = ();
= ();
= ();
m = ();
ation = ();
tionUser =
();
tonMobile =
();
tonTel = ();
tonEmail =
();
= ();
Address =
();
= ();
eUser = ();
eTel = ();
eInfo = ();
ingAddress =
();
ingCode =
();
iver = ();
= ();
er = ();
AddressMailing =
();
CodeMailing =
();
e = ();
= ();
ser = ();
elation =
();
= ();
bool b =
FraniserById(ObjFranchiser);
if (b)
{
ndRedirect("操作成功!",
"");
}
else
{
ndRedirect("操作失败!",
"");
}
S机房设备维护管理系统V1.0
12
}
///
/// 机房选择
///
///
///
protected void ddlProvince_SelectedIndexChanged(object sender,
EventArgs e)
{
();
string ProId =
ng().Trim();
DataTable CityTable =
CitiesByProvinceId(ProId);
foreach (DataRow dr in )
{
ListItem lt = new ListItem(dr["area_name"].ToString());
= dr["area_name"].ToString();
(lt);
}
}
}
using System;
using ;
using uration;
using tions;
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
using iserManager;
using COMP;
{
FranchiserManager dllFranchiser = new FranchiserManager();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnok_Click(object sender, EventArgs e)
{
e = false;
string answer = ();
string UserAnswer = tPassword(answer,
"MD5");
bool check =
serByUserAndAnswer(,
UserAnswer);
if (check)
{
("");
}
else
S机房设备维护管理系统V1.0
13
{
e = true;
}
}
}
using System;
using ;
using uration;
using tions;
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
using component;
using iserManager;
using COMP;
{
PhoneInfo SysPhoneInfo = new PhoneInfo();
FranchiserManager dllFranchiserManager = new
FranchiserManager();
public string worning = "";
protected void Page_Load(object sender, EventArgs e)
{
//得到机房日志统计
string path = h("~/admin/");
DataSet objDataSet = new DataSet();
l(path);
worning = [0].Rows[0][0].ToString();
if (Session["FranchiserId"] == null ||
Session["FranchiserId"].ToString().Length == 0)
{
ct("");
}
BindList();
//绑定当前得到机房日志统计
5_st(3);
}
void BindList()
{
DataTable dt = _TopPhoneList(8, 2);
if (dt != null)
{
urce = tView;
nd();
}
}
///
///
///
///
protected void lbtnBuy_Click(object sender, EventArgs e)
{
LinkButton bt = (LinkButton)sender;
string id = ng();
// ct("Cart_?ID=" + id);
S机房设备维护管理系统V1.0
14
ct("?ID=" + id);
}
///
/// 查看详细
///
///
///
protected void lbtnDetail_Click(object sender, EventArgs e)
{
LinkButton bt = (LinkButton)sender;
string id = ng();
ct("?ID=" + id);
}
}
using System;
using ;
using uration;
using tions;
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
using component;
using iserManager;
using COMP;
{
Franchiser objFranchiser = new
iser();
FranchiserManager dllFranchiserManager = new
FranchiserManager();
UserInfo SysUserInfo = new UserInfo();
Cart SysCart = new Cart();
Common com = new Common();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["FranchiserId"] != null &&
Session["FranchiserId"].ToString().Length != 0)
{
ct("");
}
Session["FranchiserId"] = "";
Session["FranchiserName"] = "";
if (errer != null)
{
=
ng();
}
else
{
= "";
}
}
S机房设备维护管理系统V1.0
15
}
//登陆
protected void ImageButton1_Click(object sender,
ImageClickEventArgs e)
{
Session["FranchiserId"] = "";
//密码用户名验证
=
istPwdAndUserName(ext((), 100),
tPassword((), "MD5"));
if (() ==
Session["CheckCode"].ToString())
{
if ( > 0)
{
//用户审核验证
=
ist(ext((), 100),
tPassword((), "MD5"));
if (() ==
Session["CheckCode"].ToString())
{
if ( > 0)
{
Session["FranchiserId"] = ;
//Session["webuserid"] =
;
me =
();
// string a = Session["webuserid"].ToString();
Session["FranchiserName"] =
me;
serCookies(,());
ct("");
}
else
{
("用户暂未开通!");
ory(-1);
}
}
else
{
("验证码错误!");
ory(-1);
}
}
else
{
("用户名密码错误,请重新输入!");
ory(-1);
}
}
else
S机房设备维护管理系统V1.0
16
{
("验证码错误!");
ory(-1);
}
}
///
/// 用户注册
///
///
///
protected void ImageButton2_Click(object sender,
ImageClickEventArgs e)
{
ct("");
}
///
/// 找回密码
///
///
///
protected void ImageButton3_Click(object sender,
ImageClickEventArgs e)
{
ct("");
}
}
using System;
using ;
using uration;
using tions;
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
{
public string worning = "";
protected void Page_Load(object sender, EventArgs e)
{
//得到当前机房维护统计
string path = h("~/admin/");
DataSet objDataSet = new DataSet();
l(path);
worning = [0].Rows[0][0].ToString();
if (Session["FranchiserId"] == null ||
Session["FranchiserId"].ToString().Length == 0)
{
ct("");
}
}
}
using System;
using ;
using uration;
using tions;
S机房设备维护管理系统V1.0
17
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
using iserManager;
using component;
{
FranchiserManager dllFranchiserManager = new
FranchiserManager();
Common com = new Common();
public string worning = "";
protected void Page_Load(object sender, EventArgs e)
{
//得到当前机房维护统计结果
string path = h("~/admin/");
DataSet objDataSet = new DataSet();
l(path);
worning = [0].Rows[0][0].ToString();
if (Session["FranchiserId"] == null ||
Session["FranchiserId"].ToString().Length == 0)
{
ct("");
}
if (!IsPostBack)
{
CartRepeaterDataBind();
}
}
protected void CartRepeaterDataBind()
{
DataTable table =
ersByFranchiserId(Session["FranchiserId"].ToString());
urce = tView;
nd();
}
protected void cartrepeater_ItemDataBound(object sender,
RepeaterItemEventArgs e)
{
if (pe == || pe
== atingItem)
{
Label OrderNum = ntrol("OrderNum") as
Label;
Label AddTime = ntrol("AddTime") as Label;
Label PaymentTypeStatus =
ntrol("PaymentTypeStatus") as Label;
//Label priceVipJ = ntrol("priceVipJ") as
Label;
Label DeliverStatus =
ntrol("DeliverStatus") as Label;
Label subTotal = ntrol("subTotal") as
Label;
DataRowView drv = em as DataRowView;
= drv["OrderNum"].ToString();
S机房设备维护管理系统V1.0
18
= drv["AddTime"].ToString();
if (drv["PaymentTypeStatus"].ToString() == "0")
{
= "";
}
else
{
= "";
}
if (drv["DeliverStatus"].ToString() == "0")
{
= "";
}
else if (drv["DeliverStatus"].ToString() == "1")
{
= "";
}
else
{
= "";
}
//得到机房日均流量
DataTable addtable =
ersADDByOrderNum(drv["OrderNum"].ToString());
decimal d = 0;
if ( != 0)
{
d =
mal([0]["subcount"].ToString());
}
= ("{0:c}",
mal(drv["AllMoney"].ToString()) - d);
}
}
}
using System;
using ;
using uration;
using tions;
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
using component;
using COMP;
{
//int intID = ;
Cart SysCart = new Cart();
Orders SysOrders = new Orders();
UserInfo SysUserInfo = new UserInfo();
Common com = new Common();
PaymentType SysPaymentType = new PaymentType();
DeliverType SysDeliverType = new DeliverType();
public string worning = "";
protected void Page_Load(object sender, EventArgs e)
S机房设备维护管理系统V1.0
19
{//得到当前机房日流量结果
string path = h("~/admin/");
DataSet objDataSet = new DataSet();
l(path);
worning = [0].Rows[0][0].ToString();
if (Session["FranchiserId"] == null ||
Session["FranchiserId"].ToString().Length == 0)
{
ct("");
}
if (!IsPostBack)
{
ShowOrders();
}
}
private void ShowOrders()
{
string Id = ["ID"].ToString();
DataTable table = veByID(, Id);
string CartNum = [0]["CartNum"].ToString();
= [0]["UserName"].ToString();
= [0]["AddTime"].ToString();
getNeedFP([0]["NeedFP"].ToString());
getFPOK([0]["FPOK"].ToString());
get_Status([0]["Status"].ToString());
get_PaymentStatus([0]["PaymentTypeStatus"].ToString());
get_DeliverStatus([0]["DeliverStatus"].ToString());
///邦定列表
if (CartNum != "")
{
DataTable table1 = null;
table1 = tList(CartNum);
urce = tView;
nd();
}
string OrderNum = [0]["OrderNum"].ToString();
= OrderNum;
= Id;
= [0]["SHRName"].ToString();
= [0]["SHRName"].ToString();
= [0]["Tel"].ToString();
= [0]["Address"].ToString();
= [0]["PostCode"].ToString();
= [0]["Email"].ToString();
= [0]["Mobile"].ToString();
= ("{0:c}",
mal([0]["Pmoney"].ToString()));
= ("{0:c}",
mal([0]["AllMoney"].ToString()));
//得到用户的使用的流量
DataTable addtable =
ersADDByOrderNum(OrderNum);
decimal d = 0;
if ( != 0)
{
d =
S机房设备维护管理系统V1.0
20
mal([0]["subcount"].ToString());
}
= ng();
=("{0:c}",
mal([0]["AllMoney"].ToString()) - d);
int PaymentType =
32([0]["PaymentType"].ToString());
DataTable table3 = veByID(tType,
ng());
=
[0]["TypeName"].ToString();
=
[0]["Intro"].ToString()
int DeliverType =
32([0]["DeliverType"].ToString());
DataTable table2 = veByID(rType,
ng());
=
[0]["TypeName"].ToString();
= ("{0:c}",
mal([0]["Charge"].ToString()));
= ("{0:c}",
mal([0]["Charge"].ToString()));
= ("{0:c}",
mal([0]["Charge"].ToString()));
=
[0]["FPContent"].ToString();
= [0]["Remark"].ToString();
}
private void getNeedFP(string NeedFP)
{
if (NeedFP == "1")
{
= "√";
}
else
{
= "×";
}
}
private void getFPOK(string FPOK)
{
if (FPOK == "1")
{
= "√";
}
else
{
= "×";
}
}
private void get_Status(string Status)
{
if (Status == "0")
{
= "未确认";
}
S机房设备维护管理系统V1.0
21
else if (Status == "1")
{
= "已确认";
}
else
{
= "已结清";
}
}
private void get_PaymentStatus(string PaymentStatus)
{
if (PaymentStatus == "0")
{
= "";
}
else
{
= "";
}
}
private void get_DeliverStatus(string DeliverStatus)
{
if (DeliverStatus == "0")
{
= "";
}
else if (DeliverStatus == "1")
{
= "";
}
else
{
= "";
}
}
protected void cartrepeater_ItemDataBound(object sender,
RepeaterItemEventArgs e)
{
if (pe == || pe
== atingItem)
{
Label PhoneName = ntrol("PhoneName") as
Label;
Label priceH = ntrol("priceH") as Label;
Label priceZH = ntrol("priceZH") as Label;
Label PCount = ntrol("PCount") as Label;
Label subTotal = ntrol("subTotal") as
Label;
DataRowView drv = em as DataRowView;
string strPhoneAddTime =
Time(drv["PhoneAddTime"].ToString()).ToShortDateString();
string strPhoneName = drv["PhoneName"].ToString();
= strPhoneName;
= drv["PCount"].ToString();
= drv["priceH"].ToString();
=
ng((le(mal
S机房设备维护管理系统V1.0
22
(drv["subTotal"].ToString()) /
32(drv["PCount"].ToString())), 2));
= (() *
(())).ToString();
}
}
}
using System;
using ;
using uration;
using tions;
using ;
using ty;
using ;
using trols;
using ts;
using ntrols;
using component;
using iserManager;
using COMP;
{
FranchiserManager dllFranchiserManager = new
FranchiserManager();
Cart sysCart = new Cart();
int intID = ;
Cart SysCart = new Cart();
Orders SysOrders = new Orders();
Franchiser objFranchiser = new Franchiser();
Common com = new Common();
PaymentType SysPaymentType = new PaymentType();
DeliverType SysDeliverType = new DeliverType();
Bank bk = new Bank();
int num = 0;
double price = 0.0;
public string Account = "";
///
///绑定信息
///
///
///
protected void cartrepeater_ItemDataBound(object sender,
RepeaterItemEventArgs e)
{
e = false;
if (pe == || pe
== atingItem)
{
Label PhoneName = ntrol("PhoneName") as
Label;
Label priceH = ntrol("priceH") as Label;
Label priceZH = ntrol("priceZH") as Label;
TextBox PCount = ntrol("PCount") as
TextBox;
Label subTotal = ntrol("subTotal") as
Label;
Label lblIsNull = ntrol("lblIsNull") as
Label;
S机房设备维护管理系统V1.0
23
DataRowView drv = em as DataRowView;
string strPhoneAddTime =
Time(drv["PhoneAddTime"].ToString()).ToShortDateString();
string strPhoneName = drv["PhoneName"].ToString();
= strPhoneName;
= drv["PCount"].ToString();
= drv["PriceVipY"].ToString();
if (drv["PIsNull"].ToString() == "1")
{
= "无";
}
else
{
= "有";
}
if ( == 0)
{
= drv["PriceVipY"].ToString();
}
else
{
//DataTable table = veByID(TableList.l,
ng());
//string strZheKou =
[0]["ZheKou"].ToString();
decimal ZheKou = 1;//mal(strZheKou);
=
ng((64(drv["PriceVipY"].ToString()) * ZheKou, 2));
}
= (() *
(())).ToString();
num += (());
price += (());
}
}
protected void cartrepeater_ItemCommand(object source,
RepeaterCommandEventArgs e)
{
if (dName == "deletecart")
{
Label label = ntrol("CartID") as Label;
int id = ();
t(id);
ct("");
}
}
protected void cartrepeater_ItemCreated(object sender,
RepeaterItemEventArgs e)
{
//if (pe == atingItem ||
pe == )
//{
// Label label = ntrol("producteid") as
Label;
//}
}
S机房设备维护管理系统V1.0
24
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (Session["FranchiserId"] == null ||
Session["FranchiserId"].ToString().Length == 0)
{
ct("");
}
Account = ount();
CheckUserAction();
if (!IsPostBack)
{
//提示信息
ShowCurrentUserMsg();
//显示用户信息
ShowUserInfo(32(Session["FranchiserId"].ToString()));
if (intID != 0)
{
ShowOrderInfo(intID);
}
BindPaymentType();
BindDeliverType();
CartRepeaterDataBind();
DataTable table =
tList(m);
if ( > 0)
{
for (int i = 0; i < ; i++)
{
+=
[i]["PhoneName"].ToString() + ",";
}
=
( - 1);
}
else
{
= "rn";
}
= + "
DataTable Awardtable = rdPercent();
=
(le() *
le([0]["APercent"].ToString())).ToS = getcount().ToString();
}
}
catch
{
ct("");
}
}
///
/// 计算本次应该的流量数
S机房设备维护管理系统V1.0
25
///
double getcount()
{
double totlecount = 0;
//获得本能得到多少流量
DataTable table = null;
table = tList(m);
for (int i = 0; i < ; i++)
{
//获得id
string phoneid =
[i]["productID"].ToString();
//获得型号
DataTable phonetable =
veByID(nfo, phoneid);
if ( != 0)
{
DataTable bandtable =
veByID(rand,
[0]["brandid"].ToString());
string phonebrand =
[0]["brandname"].ToString();
string sjxh =
[0]["sjxh"].ToString();
DateTime dt = ;
DataTable thtable =
gleAwardByBrandAndsjxh(phonebrand, sjxh, dt);
double singlejiangli = 0;
int phonecount =
32([i]["PCount"].ToString());
if ( != 0)
{
if (32
([0]["afrom"].ToString()) <= phonecount && phonecount
<= 32 ([0]["aend"].ToString()))
{
singlejiangli = le
([0]["amoney"].ToString());
}
else if (32
([0]["bfrom"].ToString()) <= phonecount && phonecount
<= 32([0]["bend"].ToString()))
{
singlejiangli = le
([0]["bmoney"].ToString());
}
else if (32
([0]["cfrom"].ToString()) <= phonecount && phonecount
<= 32([0]["cend"].ToString()))
{
singlejiangli = le
([0]["cmoney"].ToString());
}
else if (32
([0]["dfrom"].ToString()) <= phonecount && phonecount
<= 32([0]["dend"].ToString()))
{
singlejiangli = le
S机房设备维护管理系统V1.0
26
([0]["dmoney"].ToString());
}
else if (32
([0]["efrom"].ToString()) <= phonecount && phonecount
<= 32([0]["eend"].ToString()))
{
singlejiangli = le
([0]["emoney"].ToString());
}
totlecount = totlecount + singlejiangli *
phonecount;
}
//else
//{
// //判断是否具有流量信息,如果有则计算流量信息
//}
}
}
return totlecount;
}
///
///
protected void CartRepeaterDataBind()
{
DataTable table = null;
if (kie("UserId") != "0")
{
//table =
tListByUserID(32());
table = tList(m);
}
else
{
table = tList(m);
}
urce = tView;
nd();
=
ng();
= ng();
= ng();
}
///
///
private void BindPaymentType()
{
urce =
_PayMentTypeList();
xtField = "TypeName";
lueField = "id";
nd();
if ( > 0)
{
[0].Selected = true;
}
}
///
S机房设备维护管理系统V1.0
27
///
private void BindDeliverType()
{
urce =
_DeliverTypeList();
xtField = "TypeName";
lueField = "id";
nd();
}
///
/// 得到控制机房信息
///
///
private void ShowUserInfo(int UserId)
{
string uid = Session["FranchiserId"].ToString().Trim();
DataTable table =
nchiserById(uid);
int RankID =
32([0]["LevelId"].ToString());
= [0]["UserName"].ToString();
=
[0]["OperrationUser"].ToString();
= [0]["OperratonTel"].ToString();
=
[0]["OfficeAddress"].ToString();
= [0]["Code"].ToString();
=
[0]["OperratonEmail"].ToString();
=
[0]["OperratonMobile"].ToString();
= [0]["Point"].ToString();
//控制机房级别,暂保留
// DataTable table1 =
nchiserLevelById([0]["LevelId"].ToString().Trim());
// =
[0]["LevelName"].ToString();
}
///
/// 得到 信息
///
///
private void ShowOrderInfo(int intID)
{
DataTable table = veByID(,
ng());
int intClientId =
32([0]["ClientId"].ToString());
string OrderNum = [0]["OrderNum"].ToString();
if ( != 0)
{
if (intClientId != )
{
ndRedirect("非法访问!您的IP将被记录!", "");
}
S机房设备维护管理系统V1.0
28
}
else
{
if (OrderNum != um)
{
ndRedirect("非法访问!您的IP将被记录!", "");
}
}
= [0]["UserName"].ToString();
= [0]["SHRName"].ToString();
= [0]["Tel"].ToString();
= [0]["Address"].ToString();
= [0]["PostCode"].ToString();
= [0]["Email"].ToString();
= [0]["Mobile"].ToString();
int PaymentType =
32([0]["PaymentType"].ToString());
SelectPaymentType(PaymentType);
int DeliverType =
32([0]["DeliverType"].ToString());
SelectDeliverType(DeliverType);
// =
[0]["FPContent"].ToString();
量
MakeInParam("@keyType",r,20,keyType),
MakeInParam("@keyWord",r,100,keyWord),
MakeInParam("@searchtype",,4,searchtype),
MakeInParam("@IsDel",,4,IsDel),
MakeInParam("@pageSize",,4,pageSize),
MakeInParam("@page",,4,page) };
= [0]["Remark"].ToString();
if ([0]["NeedFP"].ToString() == "1")
d = true;
else
d = false;
int endcount =
[0]["FPContent"].ToString().IndexOf(',');
=
[0]["FPContent"].ToString().Substring(5, endcount -
5);
if (intClientId != 0)
{
DataTable table1 = veByID(fo,
ng());
int RankID =
32([0]["RankID"].ToString());
DataTable table2 = veByID(nk,
ng());
=
[0]["RankName"].ToString();
}
//流量信息
DataTable addtable =
ersADDByOrderNum([0]["OrderNum"].ToString());
if ( != 0)
S机房设备维护管理系统V1.0
29
{
=
[0]["Subcount"].ToString();
}
}
private void SelectPaymentType(int intPID)
{
for (int i = 0; i < ; i++)
{
string temp = [i].Value;
if ((temp) == intPID)
{
edIndex = i;
}
}
}
private void SelectDeliverType(int intDID)
{
for (int i = 0; i < ; i++)
{
string temp = [i].Value;
if ((temp) == intDID)
{
edIndex = i;
}
}
}
///
/// 检查用户行为合法性
///
public void CheckUserAction()
{
if (tCount(m) < 1)
{
ndRedirect("对不起,还没有选择数据!",
"");
}
}
public void ShowCurrentUserMsg()
{
if ( == 0)
{
}
}
///
///
///
///
protected void btnPaymentReturn_Click(object sender,
EventArgs e)
{
ct("");
}
///
///
///
///
protected void btnPaymentSubmit_Click(object sender,
S机房设备维护管理系统V1.0
30
EventArgs e)
{
e = false;
if (d == true)
{
if ( > 0)
{
}
else
{
e = true;
return;
}
}
//判断流量是否合理
double d1 = le();//使用的流量
double d2 = le();//个人所有的流量
double d3 = le();//本次可用的流量
if (d1 > d2 || d1 > d3)
{
e = true;
return;
}
Random ran = new Random();
string CartNum = m;
string OrderNum = um;
string UserName = "NoPass";
int intClientId = 0;
UserName = Session["FranchiserName"].ToString();
intClientId =
32(Session["FranchiserId"].ToString());
decimal AllMoney = 0;
decimal Pmoney = 0;
string SHRName =
ext((), 50);
string Tel = ext((), 50);
string Address =
ext((), 200);
string PostCode =
ext((), 50);
string Email = ext((),
100);
string Mobile =
ext((), 50);
int PaymentType =
32(edValue);
int DeliverType =
32(edValue);
int NeedFP = (d) ? 1 : 0;
string FPContent = "";
if (d == true)
{
ext((), 2000);
}
else
{
FPContent = "";
}
S机房设备维护管理系统V1.0
31
string Remark =
ext((), 2000);
DataTable table = veByID(rType,
ng());
decimal chargeDeliver = 0;
chargeDeliver =
mal([0]["Charge"].ToString());
DataTable dataTable = new DataTable();
dataTable = tList(m);
foreach (DataRow dr in )
{
Pmoney = Pmoney +
mal(dr["subTotal"].ToString());
}
AllMoney = Pmoney + chargeDeliver;
DataTable OrderTable =
ersByOrderNum(());
if ( > 0)
{
int intFlag =
_Orders(OrderNum, AllMoney, Pmoney,
NeedFP, 0, Remark, SHRName, Address, PostCode, Mobile, Tel, Email,
PaymentType, DeliverType, chargeDeliver, FPContent);
updateorderadd(());
if (intFlag > 0)
{
ct("?ID=" +
intFlag + "");
}
}
else
{
int intFlag = _Orders(0,
CartNum, OrderNum, UserName, intClientId, AllMoney, Pmoney, NeedFP,
0, Remark, , SHRName, Address, PostCode, Mobile, Tel,
Email, PaymentType, DeliverType, 0, chargeDeliver, FPContent, 0,
0, 0, 2, "维护管理");
updateorderadd(());
if (intFlag > 0)
{
ct("?ID=" +
intFlag + "");
}
}
}
void updateorderadd(string ordernum)
{
#region
DataTable orderaddtable =
ersADDByOrderNum(ordernum);
if ( == 0)
{
DataTable addtable = ADD();
DataRow dr = ();
dr["OrderNum"] = ();
dr["AddCount"] = le();
dr["Subcount"] = le();
S机房设备维护管理系统V1.0
32
dr["isover"] = 1;
(dr);
a(t, ADD);
#region 更新机房表
//string sid = Session["webuserid"].ToString();
//DataTable franchisertable =
nchiserById(sid);
//if ( != 0)
//{
// double doubcount =
le([0]["point"]) +
le();
// Franisercount(sid,
doubcount);
//}
#endregion
}
else
{
DataRow dr = [0];
dr["OrderNum"] = ();
dr["AddCount"] = le();
dr["Subcount"] = le();
dr["isover"] = 1;
[0].EndEdit();
Data(t,
ADD);
}
#endregion
}
///
/// 重填信息
///
///
///
protected void btnPaymentReset_Click(object sender, EventArgs
e)
{
ct("");
}
protected void drpPaymentType_SelectedIndexChanged(object
sender, EventArgs e)
{
if ( == " ")
{
e = true;
}
else
e = false;
}
///
/// 判断是否使用
///
///
///
protected void CheckBox1_CheckedChanged(object sender,
EventArgs e)
{
S机房设备维护管理系统V1.0
33
if (d)
{
e = true;
e = true;
}
else
{
e = false;
e = false;
}
}
}
using System;
using tions;
using ;
using ent;
using uration;
using COMP;
namespace component
{
public class OrderPay : SqlHelper
{
string strSql = ;
//SqlDataReader sdr = null;
DataTable datatable = new DataTable();
public void Add_OrderPay(int intID, string UserName,
DateTime PayTime, Decimal Money, int BankID, string BankName, int
OrderID, int PaymentID, string Remark, DateTime AddTime, int
AddUserID, string IP, int IsDel)
{
SqlParameter[] prams = {
MakeInParam("@ID",,4,intID),
MakeInParam("@UserName",r,100,UserName),
MakeInParam("@PayTime",me,8,PayTime),
MakeInParam("@Money",l,10,Money),
MakeInParam("@BankID",,4,BankID),
MakeInParam("@BankName",r,50,BankName),
MakeInParam("@OrderID",,4,OrderID),
MakeInParam("@PaymentID",,4,PaymentID),
MakeInParam("@Remark",r,50,Remark),
MakeInParam("@AddTime",me,8,AddTime),
MakeInParam("@AddUserID",,4,AddUserID),
MakeInParam("@IP",r,50,IP),
MakeInParam("@IsDel",,4,IsDel)
};
try
{
RunProc("OrderPay_insert", prams);
}
catch (Exception ex)
{
(ng());
}
}
}
}
S机房设备维护管理系统V1.0
34
using System;
using ;
using ;
using ent;
using ;
using trols;
using ntrols;
using c;
using rExpressions;
using uration;
using COMP;
namespace component
{
public class Orders : SqlHelper
{
string strSql = ;
SqlDataReader sdr = null;
DataTable datatable = new DataTable();
///
///
public string OrderNum
{
get
{
if (n["OrderNum"] ==
null)
{
Random ran = new Random();
n["OrderNum"] =
ng("yyyyMMddhhmmss") +
ng((10001, 99999));
t = 240;
}
if
(OrEmpty(n["OrderNum"].ToString()))
{
Random ran = new Random();
n["OrderNum"] =
ng("yyyyMMddhhmmss") +
ng((10001, 99999));
t = 240;
}
return
n["OrderNum"].ToString();
}
set
{
n["OrderNum"] = value;
}
}
public int Add_Orders(int ID, string CartNum, string
OrderNum, string UserName, int ClientId, Decimal AllMoney, Decimal
Pmoney, int NeedFP, int FPOK, string Remark, DateTime AddTime,
string SHRName, string Address,
string PostCode, string Mobile, string Tel,
string Email, int PaymentType, int DeliverType, int Status, Decimal
S机房设备维护管理系统V1.0
35
DeliverMoney, string FPContent, int DeliverStatus, int
PaymentTypeStatus, int AddUserID, int IsDel)
{
SqlParameter[] prams = {
MakeInParam("@ID",,4,ID),
MakeInParam("@CartNum",r,50,CartNum),
MakeInParam("@OrderNum",r,50,OrderNum),
MakeInParam("@UserName",r,50,UserName),
MakeInParam("@ClientId",,4,ClientId),
MakeInParam("@AllMoney",l,10,AllMoney),
MakeInParam("@Pmoney",l,10,Pmoney),
MakeInParam("@NeedFP",,4,NeedFP),
MakeInParam("@FPOK",,4,FPOK),
MakeInParam("@Remark",r,2000,Remark),
MakeInParam("@AddTime",me,8,AddTime),
MakeInParam("@SHRName",r,50,SHRName),
MakeInParam("@Address",r,200,Address),
MakeInParam("@PostCode",r,50,PostCode),
MakeInParam("@Mobile",r,50,Mobile),
MakeInParam("@Tel",r,50,Tel),
MakeInParam("@Email",r,50,Email),
MakeInParam("@PaymentType",,4,PaymentType),
MakeInParam("@DeliverType",,4,DeliverType),
MakeInParam("@Status",,4,Status),
akeInParam("@DeliverMoney",l,10,DeliverMoney)
MakeInParam("@FPContent",r,2000,FPContent),
MakeInParam("@DeliverStatus",,4,DeliverStatus),
MakeInParam("@PaymentTypeStatus",,4,PaymentTypeStatus),
akeInParam("@AddUserID",,4,AddUserID),
MakeInParam("@IsDel",,4,IsDel)
};
try
{
int intFlag = RunProc("Orders_Add", prams);
return intFlag;
}
catch (Exception ex)
{
(ng());
return -1;
}
}
public int Update_Orders(int ID, string CartNum, string
OrderNum, string UserName, int ClientId, Decimal AllMoney, Decimal
Pmoney, int NeedFP, int FPOK, string Remark, DateTime AddTime,
string SHRName, string Address,
string PostCode, string Mobile, string Tel,
string Email, int PaymentType, int DeliverType, int Status, Decimal
DeliverMoney, string FPContent, int DeliverStatus, int
PaymentTypeStatus, int AddUserID, int IsDel)
{
SqlParameter[] prams = {
MakeInParam("@ID",,4,ID),
MakeInParam("@CartNum",r,50,CartNum),
MakeInParam("@OrderNum",r,50,OrderNum),
S机房设备维护管理系统V1.0
36
MakeInParam("@UserName",r,50,UserName),
MakeInParam("@ClientId",,4,ClientId),
MakeInParam("@AllMoney",l,10,AllMoney),
MakeInParam("@Pmoney",l,10,Pmoney),
MakeInParam("@NeedFP",,4,NeedFP),
MakeInParam("@FPOK",,4,FPOK),
MakeInParam("@Remark",r,2000,Remark),
MakeInParam("@AddTime",me,8,AddTime),
MakeInParam("@SHRName",r,50,SHRName),
MakeInParam("@Address",r,200,Address),
MakeInParam("@PostCode",r,50,PostCode),
MakeInParam("@Mobile",r,50,Mobile),
MakeInParam("@Tel",r,50,Tel),
MakeInParam("@Email",r,50,Email),
MakeInParam("@PaymentType",,4,PaymentType),
MakeInParam("@DeliverType",,4,DeliverType),
MakeInParam("@Status",,4,Status),
MakeInParam("@DeliverMoney",l,10,DeliverMoney)
MakeInParam("@FPContent",r,2000,FPContent),
MakeInParam("@DeliverStatus",,4,DeliverStatus),
MakeInParam("@PaymentTypeStatus",,4,PaymentTypeStatus),
MakeInParam("@AddUserID",,4,AddUserID),
MakeInParam("@IsDel",,4,IsDel) };
try {
int intFlag = RunProc("Orders_Update", prams);
return intFlag;
}
catch (Exception ex)
{
(ng());
return -1;
}
}
public bool UpdateOrderDel(int intID, int IsDel)
{
SqlParameter[] prams =
{ MakeInParam("@ID",,4,intID),
MakeInParam("@IsDel",,4,IsDel)
};
try
{
RunProc("Order_UpdateIsDel", prams);
return true;
}
catch (Exception ex)
{
(ng());
return false;
}
}
///
///
///
///
///
public bool UpdateOrderStatus(int intID, int Status)
{
S机房设备维护管理系统V1.0
37
SqlParameter[] prams =
{ MakeInParam("@ID",,4,intID),
MakeInParam("@Status",,4,Status)
};
try
{
RunProc("Order_UpdateStatus", prams);
return true;
}
catch (Exception ex)
{
(ng());
return false;
}
}
public bool UpdateOrderPaymentTypeStatus(int intID, int
PaymentTypeStatus)
{
SqlParameter[]prams =
{ MakeInParam("@ID",,4,intID),
MakeInParam("@PaymentTypeStatus",,4,PaymentTypeStatus)
};
try
{
RunProc("Order_UpdatePaymentTypeStatus", prams);
return true;
}
catch (Exception ex)
{
(ng());
return false;
}
}
public bool UpdateOrderDeliverStatus(int intID, int
DeliverStatus)
{
SqlParameter[] prams = {
MakeInParam("@ID",,4,intID),
MakeInParam("@DeliverStatus",,4,DeliverStatus)
};
try
{
RunProc("Order_UpdateDeliverStatus", prams);
return true;
}
catch (Exception ex)
{
(ng());
return false;
}
}
public bool UpdateOrderFPOK(int intID, int FPOK)
{
SqlParameter[] prams = {
S机房设备维护管理系统V1.0
38
MakeInParam("@ID",,4,intID),
MakeInParam("@FPOK",,4,FPOK)
};
try
{
RunProc("Order_UpdateFPOK", prams);
return true;
}
catch (Exception ex)
{
(ng());
return false;
}
}
public void getContentList(string keyType, string keyWord,
int searchtype, int IsDel, int page, ref GridView gvList, ref
Literal ltPager)
{
int pageSize = 20;
int countNum = 0;
int pageCount = 1;
page = page == 0 ? 1 : page;
countNum = Get_OrdersCount(keyType, keyWord, searchtype,
IsDel);
pageCount = countNum % pageSize == 0 ? countNum / pageSize :
countNum / pageSize + 1;
page = page > pageCount ? pageCount : page;
urce = Get_OrdersList(keyType, keyWord,
searchtype, IsDel, pageSize, page);
yNames = new string[] { "id" };
nd();
string[] FiledName = new string[] { "keyType", "keyWord",
"searchtype", "IsDel" };
string[] FiledValue = new string[] { keyType, keyWord,
ng(), ng() };
= st(countNum, pageCount,
page, FiledName, FiledValue);
}
///
///
///
///
///
///
///
///
///
///
public void getContentListByFranchiser(string keyType,
string keyWord, int searchtype, int IsDel, int page, ref GridView
gvList, ref Literal ltPager)
{
int pageSize = 20;
int countNum = 0;
int pageCount = 1;
page = page == 0 ? 1 : page;
countNum = Get_OrdersCount(keyType, keyWord, searchtype,
S机房设备维护管理系统V1.0
39
IsDel);
pageCount = countNum % pageSize == 0 ? countNum / pageSize :
countNum / pageSize + 1;
page = page > pageCount ? pageCount : page;
urce = Get_OrdersListByFranchiser(keyType,
keyWord, searchtype, IsDel, pageSize, page);
yNames = new string[] { "id" };
nd();
string[] FiledName = new string[] { "keyType", "keyWord",
"searchtype", "IsDel" };
string[] FiledValue = new string[] { keyType, keyWord,
ng(), ng() };
= st(countNum, pageCount,
page, FiledName, FiledValue);
}
public DataTable Get_OrdersList(string keyType, string
keyWord, int searchtype, int IsDel, int pageSize, int page)
{
SqlParameter[] prams = {
MakeInParam("@keyType",r,20,keyType)
MakeInParam("@keyWord",r,100,keyWord),
MakeInParam("@searchtype",,4,searchtype),
MakeInParam("@IsDel",,4,IsDel),
MakeInParam("@pageSize",,4,pageSize),
MakeInParam("@page",,4,page)
};
try
{
RunProc("Get_OrdersList", prams, out sdr);
datatable = ConvertDataReaderToDataTable(sdr);
();
e();
}
catch (Exception ex)
{
(ng());
}
return datatable;
}
public DataTable Get_OrdersListByFranchiser(string
keyType, string keyWord, int searchtype, int IsDel, int pageSize,
int page)
{
SqlParameter[] prams = {
MakeInParam("@keyType",r,20,keyType),
MakeInParam("@keyWord",r,100,keyWord),
MakeInParam("@searchtype",,4,searchtype),
MakeInParam("@IsDel",,4,IsDel),
MakeInParam("@pageSize",,4,pageSize),
MakeInParam("@page",,4,page) };
try
{
RunProc("Get_OrdersListByFranchiser", prams, out sdr);
datatable = ConvertDataReaderToDataTable(sdr);
();
e();
S机房设备维护管理系统V1.0
40
}
catch (Exception ex)
{
(ng());
}
return datatable;
}
public int Get_OrdersCount(string keyType, string keyWord,
int searchtype, int IsDel)
{
int intcount = 0;
SqlParameter[] prams = {
MakeInParam("@keyType",r,20,keyType),
MakeInParam("@keyWord",r,100,keyWord),
MakeInParam("@searchtype",,4,searchtype),
MakeInParam("@IsDel",,4,IsDel) };
try
{
RunProc("Get_OrdersCount", prams, out sdr);
if (())
{
intcount = 32(0);
}
();
e();
return intcount;
= [0]["SHRName"].ToString();
= [0]["SHRName"].ToString();
= [0]["Tel"].ToString();
= [0]["Address"].ToString();
= [0]["PostCode"].ToString();
= [0]["Email"].ToString();
= [0]["Mobile"].ToString();
= ("{0:c}"
}
catch (Exception ex)
{
(ng());
return 0;
}
}
public void Execute_Content(string ids)
{
string[] idValue;
idValue = (',');
string ColumnId = ;
for (int i = 0; i < ; i++)
{
DelOrders(32(idValue[i].ToString()));
}
}
public bool DelOrders(int intID)
{
SqlParameter[] prams = {
MakeInParam("@intID",,4,intID)
S机房设备维护管理系统V1.0
41
};
try
{
RunProc("Del_Orders", prams);
return true;
}
catch (Exception ex)
{
(ng());
return false;
}
}
public DataTable Get_OrdersList(int ClientId)
{
SqlParameter[] prams = {
MakeInParam("@ClientId",,4,ClientId),
};
try
{
RunProc("Get_OrdersListByClientId", prams, out
sdr);
datatable = ConvertDataReaderToDataTable(sdr);
();
e();
}
catch (Exception ex)
{
(ng());
}
return datatable;
}
}
}
using System;
using tions;
using ;
using ent;
using uration;
using COMP;
namespace component
{
public class PaymentType : SqlHelper
{
SqlDataReader sdr = null;
DataTable datatable = new DataTable();
///
///
///
public DataTable Get_PayMentTypeList()
{
try
{
RunProc("Get_PayMentTypeList", out sdr);
datatable = ConvertDataReaderToDataTable(sdr);
();
e();
}
S机房设备维护管理系统V1.0
42
catch (Exception ex)
{
(ng());
}
return datatable;
}
public void Set_HY(int intID, int Flag)
{
SqlParameter[] prams =
{MakeInParam("@Id",,4,intID),
MakeInParam("@Flag",,4,Flag)
};
try
{
RunProc("PaymentType_HY", prams);
}
catch (Exception ex)
{
(ng());
}
}
}
}
using System;
using tions;
using ;
using ent;
using uration;
using COMP;
namespace component
{
public class PhoneBrand : SqlHelper
{
SqlDataReader sdr = null;
DataTable datatable = new DataTable();
public bool Exists_Brand(int BrandId)
{
SqlParameter[]prams=
{ MakeInParam("@BrandID",,4,BrandId)
};
try
{
int intFlag = RunProc("Exists_Brand", prams);
if (intFlag == 1)
return true;
else
return false;
}
catch (Exception ex)
{
(ng());
return false;
}
}
///
///
///
public DataTable Get_BrandList()
S机房设备维护管理系统V1.0
43
{
try
{
RunProc("Get_BrandList", out sdr);
datatable = ConvertDataReaderToDataTable(sdr);
();
e();
}
catch (Exception ex)
{
(ng());
}
return datatable;
}
public DataTable Get_BrandList(string strTypeName)
{
SqlParameter[] prams = {
MakeInParam("@TypeName",r,20,strTypeName)
};
try
{
RunProc("Get_BrandListByTypeName", prams, out sdr);
datatable = ConvertDataReaderToDataTable(sdr);
();
e();
}
catch (Exception ex)
{
(ng());
}
return datatable;
}
= ng();
=("{0:c}",
mal([0]["AllMoney"].ToString()) - d);
int PaymentType =
32([0]["PaymentType"].ToString());
DataTable table3 = veByID(tType,
ng());
public DataTable Get_BrandListByTop(int intFlag,int
intCount)
{
SqlParameter[] prams = {
MakeInParam("@intFlag",,4,intFlag),
MakeInParam("@intCount",,4,intCount)
};
try
{
RunProc("Get_BrandListByTop", prams, out sdr);
datatable = ConvertDataReaderToDataTable(sdr);
();
e();
}
catch (Exception ex)
S机房设备维护管理系统V1.0
44
{
(ng());
}
return datatable;
}
public string Get_PhoneBrandList(int SColnum)
{
DataTable PhoneBrandDT = null;
//Builder builder = new
Builder();
PhoneBrandDT = _BrandList();
string text = "";
if (PhoneBrandDT != null)
{
int num = 1;
text = "
height='16'> | href='?brandid=" + BrandID + "' class='" + ClassName + "' >" + BrandName + " | ";
}
return text;
}
public string Get_PhoneBrandListImg(int SColnum)
{
DataTable PhoneBrandDT = null;
//Builder builder = new
Builder();
PhoneBrandDT = _BrandList();
string text = "";
if (PhoneBrandDT != null)
{
int num = 1;
text = "
height='16'> | S机房设备维护管理系统V1.0 45 href='Product/?brandid=" + BrandID + "' class='" + ClassName + "' > height=36 border=0/> | ";
}
return text;
}
public string Get_PhoneBrandListByTop(int intFlag, int
intCount,int intFrom)
{
DataTable PhoneBrandDT = null;
//Builder builder = new
Builder();
PhoneBrandDT = _BrandListByTop(intFlag,
intCount);
string text = "";
if (PhoneBrandDT != null)
{
for (int i = 0; i < ; i++)
{
string BrandID =
[i]["id"].ToString();
string BrandName =
[i]["BrandName"].ToString();
string ClassName =
[i]["ClassName"].ToString();
if(intFrom == 2)
text = text + " href='?brandid=" + BrandID + "' class='f_12_717171'>" + BrandName + "
else
text = text + " href='Product/?brandid=" + BrandID + "' class='f_12_717171'>" + BrandName + "
}
}
return text;
}
public string Get_PhoneBrandList(string strTypeName, int
SColnum)
{
DataTable PhoneBrandDT = null;
PhoneBrandDT = _BrandList(strTypeName);
string text = "";
if (PhoneBrandDT != null)
{
int num = 1;
text = "
align='center' bgcolor='#f6f6f6'>" S机房设备维护管理系统V1.0 46 + strTypeName + " | |||||
height='35' bgcolor='#ffffff'> href='../Product/?brandid=" + BrandID + "' class='" + ClassName + "' >" + BrandName + " | "; |||||
}
return text;
}
}
}
using System;
using ;
using ;
using ent;
using ;
using trols;
using ntrols;
using c;
using rExpressions;
using uration;
using COMP;
namespace component
{
public class PhonePL : SqlHelper
{
SqlDataReader sdr = null;
DataTable datatable = new DataTable();
Common com = new Common();
public string GetPhonePLByDefault(int intType)
{
string TempStr = "";
DataTable dt = null;
if (intType == 0)
{
dt = Get_PhonePLByIndex(10, 10000);
}
if (intType == 1)
{
dt = Get_PhonePLByIndex(10, 0);
}
if (intType == 2)
{
dt = Get_PhonePLByIndex(10, 30);
S机房设备维护管理系统V1.0
47
}
if (intType == 3)
{
dt = Get_PhonePLByIndex(10, 6);
}
if ( > 0)
{
TempStr = "
align='left' class='f_12_575757'> | "; class='f_12_575757'> height='12' align='absmiddle' />"; TempStr += " " + strPhoneName + " (" + [i]["Hit"].ToString() + ") | "; class='f_12_575757'> ¥" + [i]["PriceH"].ToString() + " | "; class='f_12_575757'> |
}
return TempStr;
}
public string GetsubPhonePLByDefault(int intType)
{
string TempStr = "";
DataTable dt = null;
if (intType == 0)
{
dt = Get_PhonePLByIndex(10, 10000);
}
if (intType == 1)
{
dt = Get_PhonePLByIndex(10, 0);
}
if (intType == 2)
{
dt = Get_PhonePLByIndex(10, 30);
}
if (intType == 3)
{
dt = Get_PhonePLByIndex(10, 6);
}
if ( > 0)
{
S机房设备维护管理系统V1.0
48
TempStr = "
align='left' class='f_12_575757'> | "; class='f_12_575757'> width='15' height='12' align='absmiddle' />"; TempStr += " " + strPhoneName + " (" + [i]["Hit"].ToString() + ") | "; class='f_12_575757'> ¥" + [i]["PriceH"].ToString() + " | "; class='f_12_575757'> |
}
return TempStr;
}
//截取字符串
public string CutTitle(string str, int len)
{
int intLen = ;
int start = 0;
int end = intLen;
int single = 0;
char[] chars = Array();
for (int i = 0; i < ; i++)
{
if (32(chars[i]) > 255)
start += 2;
else
{
start += 1;
single++;
}
if (start >= len)
{
if (end % 2 == 0)
{
if (single % 2 == 0)
end = i + 1;
else
end = i;
}
else
end = i + 1;
S机房设备维护管理系统V1.0
49
break;
}
}
string temp = ing(0, end);
if ( > end)
return temp + "...";
else
return temp;
}
private DataTable Get_PhonePLByIndex(int intCount, int
intDays)
{
SqlParameter[] prams = {
MakeInParam("@intCount",,4,intCount),
MakeInParam("@intDays",,4,intDays)
};
try
{
RunProc("Get_PhonePLByIndex", prams, out sdr);
datatable = ConvertDataReaderToDataTable(sdr);
();
e();
}
catch (Exception ex)
{
(ng());
}
return datatable;
}
}
}
using System;
using tions;
using ;
using ent;
using uration;
using COMP;
namespace component
{
public class PriceSit : SqlHelper
{
public void Set_HY(int intID, int Flag)
{
SqlParameter[] prams = {
MakeInParam("@Id",,4,intID),
MakeInParam("@Flag",,4,Flag)
};
try
{
RunProc("PriceSit_HY", prams);
}
catch (Exception ex)
版权声明:本文标题:S机房设备维护管理系统V1.0源代码 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/free/1702834166h432617.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论