void Sys_Login_Check(HttpContext context) { string LoginName = StringHelper.NullToStr(Filter.FilterData(context.Request["LoginName"])); string LoginPassword = StringHelper.NullToStr(Filter.FilterData(context.Request["LoginPassword"])); string SecretCode = StringHelper.NullToStr(Filter.FilterData(context.Request["SecretCode"])); string retMsg = ""; if (SecretCode != "123456") { retMsg = "error01"; context.Response.Write(retMsg); context.Response.End(); } string tableName = "Sys_Admin"; string sqlWhere = " and AUserName='******' and APassWord='******'"; string showField = "top 1 Id,DutyID"; DataTable dt = new HoneyWell.BLL.Sys_Public().SelectData(showField, tableName, sqlWhere).Tables[0]; if (dt != null && dt.Rows.Count > 0) { HttpCookie cookie = new HttpCookie("Fadmin"); cookie["DutyId"] = dt.Rows[0]["DutyID"].ToString(); cookie["UserName"] = LoginName; cookie["PassWord"] = LoginPassword; HttpContext.Current.Response.Cookies.Add(cookie); HoneyWell.Model.Sys_Logs logs = new HoneyWell.Model.Sys_Logs(); logs.ID = 0; logs.DutyId = Utils.ToInt(dt.Rows[0]["DutyID"].ToString()); logs.LoginName = LoginName; logs.TitleName = "用户登录"; logs.Depicts = "系统后台登陆,会员名为:" + LoginName + ""; logs.CreateTime = DateTime.Now; logs.IpAddress = HttpContext.Current.Request.UserHostAddress; logs.MoreCol1 = ""; logs.MoreCol2 = ""; new HoneyWell.BLL.Sys_Logs().Add(logs); retMsg = "success"; context.Response.Write(retMsg); context.Response.End(); } else { retMsg = "error02"; context.Response.Write(retMsg); context.Response.End(); } }
public void pageBind() { string strWhere = " "; string tableName = "Sys_Coupon"; string showField = " ID,CType,CName,CCode,CSum,CDeduction,StartingTime,EndTime,IssueNum"; string orderField = "ID"; int count = 0; DataSet ds = new HoneyWell.BLL.Sys_Public().GetList(tableName, showField, orderField, MyPager.Pagesize, MyPager.Pageindex + 1, 0, strWhere, out count); rptLoop.DataSource = ds; rptLoop.DataBind(); MyPager.Count = count; }
public void pageBind() { string strWhere = " "; if (ONumber != "") { strWhere += " and ONumber =" + ONumber + ""; } string tableName = "Sys_Shopping"; string showField = " ID,SName,SSmallPic,SFormat,SMarket,SRetail,SQuantity,SSum"; DataSet ds = new HoneyWell.BLL.Sys_Public().SelectData(showField, tableName, strWhere); rptLoop.DataSource = ds; rptLoop.DataBind(); }
void BindType() { txt_PTypeMain.Items.Clear(); ListItem item1 = new ListItem("==请选择==", ""); ListItem item2 = new ListItem("==请选择==", ""); txt_PTypeMain.Items.Add(item1); DataTable dt = new HoneyWell.BLL.Sys_Public().SelectData("TCode,TName", "Sys_Type", "and TLevel=1 order by ID desc").Tables[0]; for (int i = 0; i < dt.Rows.Count; i++) { ListItem item = new ListItem(); item.Text = dt.Rows[i]["TName"].ToString(); item.Value = dt.Rows[i]["TCode"].ToString(); txt_PTypeMain.Items.Add(item); } txt_PTypeSmall.Items.Add(item2); }
//绑定数据 void BindModel() { string strWhere = "and ONumber='" + Number + "'"; string tableName = "Sys_Invoice"; string showField = " ID"; DataTable dt = new HoneyWell.BLL.Sys_Public().SelectData(showField, tableName, strWhere).Tables[0]; if (dt != null && dt.Rows.Count > 0) { BLL.Sys_Invoice sys_BLL = new BLL.Sys_Invoice(); Model.Sys_Invoice sys_Model = sys_BLL.GetModel(Utils.ToInt(dt.Rows[0]["ID"].ToString())); ONumber = sys_Model.ONumber; ICode = sys_Model.ICode; GetICode(ICode); IGainGround = sys_Model.IGainGround; ITaxNumber = sys_Model.ITaxNumber; txtIRemarks.Value = sys_Model.IRemarks; } }
public void pageBind() { string strWhere = " "; if (Phone != "") { strWhere += " and Phone like '%" + Phone + "%'"; txt_Phone.Value = Phone; } if (txt_ONumber.Value.Trim().Length > 0) { strWhere += " and ONumber like '%" + txt_ONumber.Value.Trim() + "%'"; } if (txtOType.SelectedValue.Trim().Length > 0) { strWhere += " and OType =" + txtOType.SelectedValue.Trim() + ""; } if (txt_IType.Value.Trim().Length > 0) { strWhere += " and IType =" + txt_IType.Value.Trim() + ""; } if (txtOStatus.SelectedValue.Trim().Length > 0) { strWhere += " and OStatus =" + txtOStatus.SelectedValue.Trim() + ""; } string tableName = "Sys_Orders"; string showField = " ID,Phone,ONumber,OType,CCompany,SNumber,OFee,OFare,OCope,OActuallyPaid,IType,OStatus,CreateTime"; string orderField = "ID"; int count = 0; DataSet ds = new HoneyWell.BLL.Sys_Public().GetList(tableName, showField, orderField, MyPager.Pagesize, MyPager.Pageindex + 1, 0, strWhere, out count); rptLoop.DataSource = ds; rptLoop.DataBind(); MyPager.Count = count; }
public void pageBind() { string strWhere = ""; if (txtCState.SelectedValue.Length > 0) { strWhere += "and CState='" + txtCState.SelectedValue.Trim() + "'"; } strWhere += " and CCode ='" + CCode + "'"; string tableName = "Sys_Coupon_Details"; string showField = " ID,CCode,CSmallCode,CTime,CState,ReceiveUser,ReceiveTime"; string orderField = "ID"; int count = 0; DataSet ds = new HoneyWell.BLL.Sys_Public().GetList(tableName, showField, orderField, MyPager.Pagesize, MyPager.Pageindex + 1, 0, strWhere, out count); rptLoop.DataSource = ds; rptLoop.DataBind(); MyPager.Count = count; }
public void pageBind() { string strWhere = " "; if (txt_FCode.Value.Trim().Length > 0) { strWhere += " and FCode like '%" + txt_FCode.Value.Trim() + "%'"; } if (Code != "") { strWhere += " and FCode like '%" + Code + "%'"; txt_FCode.Value = Code; } if (txt_FName.Value.Trim().Length > 0) { strWhere += " and FName like '%" + txt_FName.Value.Trim() + "%'"; } if (Name != "") { strWhere += " and FName like '%" + Name + "%'"; txt_FName.Value = Name; } if (Pageindex != "") { MyPager.Pageindex = Utils.ToInt(Pageindex); } string tableName = "Sys_Focus"; string showField = " ID,FCode,FName,FOrder,CreateUser,CreateTime"; string orderField = "ID"; int count = 0; DataSet ds = new HoneyWell.BLL.Sys_Public().GetList(tableName, showField, orderField, MyPager.Pagesize, MyPager.Pageindex + 1, 0, strWhere, out count); rptLoop.DataSource = ds; rptLoop.DataBind(); MyPager.Count = count; }
public void pageBind() { string strWhere = " "; if (txt_Phone.Value.Trim().Length > 0) { strWhere += " and Phone like '%" + txt_Phone.Value.Trim() + "%'"; } if (Phone != "") { strWhere += " and Phone like '%" + Phone + "%'"; txt_Phone.Value = Phone; } if (txt_ONumber.Value.Trim().Length > 0) { strWhere += " and ONumber like '%" + txt_ONumber.Value.Trim() + "%'"; } if (txtRStatus.SelectedValue.Trim().Length > 0) { strWhere += " and RStatus =" + txtRStatus.SelectedValue.Trim() + ""; } string tableName = "Sys_Return"; string showField = " ID,Phone,ONumber,RReason,RATime,RReply,RReplyTime,RStatus"; string orderField = "ID"; int count = 0; DataSet ds = new HoneyWell.BLL.Sys_Public().GetList(tableName, showField, orderField, MyPager.Pagesize, MyPager.Pageindex + 1, 0, strWhere, out count); rptLoop.DataSource = ds; rptLoop.DataBind(); MyPager.Count = count; }
public void pageBind() { string strWhere = " "; if (txt_Name.Value.Trim().Length > 0) { strWhere += " and Name like '%" + txt_Name.Value.Trim() + "%' or NickName like '%" + txt_Name.Value.Trim() + "%'"; } if (txt_Phone.Value.Trim().Length > 0) { strWhere += " and Phone like '%" + txt_Phone.Value.Trim() + "%'"; } if (Phone != "") { strWhere += " and Phone like '%" + Phone + "%'"; txt_Phone.Value = Phone; } if (txtSex.SelectedValue.Trim().Length > 0) { strWhere += " and Sex =" + txtSex.SelectedValue.Trim() + ""; } string tableName = "Sys_Users"; string showField = " ID,Name,NickName,Phone,DateBirth,Sex,Email,CreateTime"; string orderField = "ID"; int count = 0; DataSet ds = new HoneyWell.BLL.Sys_Public().GetList(tableName, showField, orderField, MyPager.Pagesize, MyPager.Pageindex + 1, 0, strWhere, out count); rptLoop.DataSource = ds; rptLoop.DataBind(); MyPager.Count = count; }
public string GetType(string PTypeMain, string PTypeSmall) { string Name = ""; string tableName = "Sys_Type"; string showField = "TName"; string strWhere1 = "and TCode='" + PTypeMain + "'"; string strWhere2 = "and TCode='" + PTypeSmall + "'"; DataTable dt1 = new HoneyWell.BLL.Sys_Public().SelectData(showField, tableName, strWhere1).Tables[0]; if (dt1 != null && dt1.Rows.Count > 0) { DataTable dt2 = new HoneyWell.BLL.Sys_Public().SelectData(showField, tableName, strWhere2).Tables[0]; if (dt2 != null && dt2.Rows.Count > 0) { Name += dt1.Rows[0]["TName"].ToString(); Name += "--" + dt2.Rows[0]["TName"].ToString(); } else { Name = dt1.Rows[0]["TName"].ToString(); } } return(Name); }
public void pageBind() { string strWhere = ""; if (hfPTypeMain.Value.Length > 0) { strWhere += " and PTypeMain ='" + hfPTypeMain.Value + "'"; } if (Ptypemain != "") { strWhere += " and PTypeMain ='" + Ptypemain + "'"; } if (hfPTypeSmall.Value.Length > 0) { strWhere += "and PTypeSmall ='" + hfPTypeSmall.Value + "'"; } if (Ptypesmall != "") { strWhere += " and PTypeSmall ='" + Ptypesmall + "'"; } if (txt_PName.Value.Trim().Length > 0) { strWhere += " and PName like '%" + txt_PName.Value.Trim() + "%'"; } if (Pname != "") { strWhere += " and PName like '%" + Pname + "%'"; txt_PName.Value = Pname; } if (txt_PRecommend.SelectedValue.Length > 0) { strWhere += " and PRecommend ='" + txt_PRecommend.SelectedValue.Trim() + "'"; } if (Precommend != "") { strWhere += " and PRecommend = '" + Precommend + "'"; txt_PRecommend.SelectedValue = Precommend; } if (txt_PShelf.SelectedValue.Length > 0) { strWhere += " and PShelf ='" + txt_PShelf.SelectedValue.Trim() + "'"; } if (Pshelf != "") { strWhere += " and PShelf = '" + Pshelf + "'"; txt_PShelf.SelectedValue = Pshelf; } //返回当前页面 if (Pageindex != "") { MyPager.Pageindex = Utils.ToInt(Pageindex); } string tableName = "Sys_Product"; string showField = " ID,PTypeMain,PTypeSmall,PName,PSmallPic,PMarket,PRetail,PStock,PRecommend,PShelf,ModifyTime"; string orderField = "ID"; int count = 0; DataSet ds = new HoneyWell.BLL.Sys_Public().GetList(tableName, showField, orderField, MyPager.Pagesize, MyPager.Pageindex + 1, 0, strWhere, out count); rptLoop.DataSource = ds; rptLoop.DataBind(); MyPager.Count = count; }