protected void Button1_Click(object sender, EventArgs e) { SalesDispatchDAL sdal = new SalesDispatchDAL(); sdal.sentUpdate(int.Parse(OrderID.Text.ToString()), DateTime.Now.ToString("yyyy-MM-dd"), 3, " 问题描述:" + issueInfo.Text.ToString(), float.Parse("0.00")); VSalesDispatch vs = Leyp.SQLServerDAL.Sales.Factory.getSalesDispatchDAL().getByID(int.Parse(OrderID.Text.ToString())); //在接着得到销售订单 VSalesOrder vso = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getByID(vs.SalesOrderID); //得到下单用户 string username = vso.UserName; ServiceInfo s = new ServiceInfo(); s.CreateDate = DateTime.Now.ToString("yyyy-MM-dd"); s.Content = "订单号:" + vs.SalesOrderID + "配送错误,请您查询。原因是:" + issueInfo.Text; s.ServiceTitle = "配送问题--" + DateTime.Now.ToString("yyyy-MM-dd"); s.UserName = username; s.TypeID = 2; if (Leyp.SQLServerDAL.Factory.getServiceInfoDAL().insertNewEntity(s)) { Jscript.RefreshParent("MySalesDispatch.aspx"); Jscript.CloseWindow(); } }
protected void Button1_Click(object sender, EventArgs e) { SalesOut s = new SalesOut(); SalesOrder so = new SalesOrder(); s.Consignee = Consignee.Text.ToString(); s.CreateDate = CreateDate.Text.ToString(); s.DeliveryID = int.Parse(DeliveryID.SelectedValue.ToString()); s.Description = Description.Text.ToString(); s.SalesOutID = SalesOutID.Text.ToString(); s.UserName = getUserName(); s.TradeDate = TradeDate.Text.ToString(); s.SalesOrderID = SalesOrderID.Text.ToString(); so.CustomerArea = CustomerArea.Value.ToString(); so.CustomerID = CustomerIDType.Value + CustomerID.Text.ToString(); so.CustomerName = CustomerName.Text.ToString(); so.CustomerPost = CustomerPost.Text.ToString(); so.CustomerTel = CustomerTel.Text.ToString(); so.Discount = float.Parse(Discount.Text.ToString()); so.AttachPay = float.Parse(AttachPay.Text.ToString()); so.SalesOrderID = SalesOrderID.Text.ToString(); so.PlatformID = int.Parse(Platform.SelectedValue.ToString()); if (Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().updateCustomerInfo(so)) //顾客信息更新成功 { Leyp.SQLServerDAL.Sales.Factory.getSalesOutDAL().updataEntity(s); Jscript.RefreshParent("Manager_SalesOutOrder.aspx"); Jscript.CloseWindow(); } }
protected void Button1_Click(object sender, EventArgs e) { float cost = float.Parse("0.00"); cost = float.Parse(Postage.Text.ToString()); if (Leyp.SQLServerDAL.Sales.Factory.getSalesDispatchDAL().sentUpdate(int.Parse(Label3.Text.ToString()), SentDate.Text.ToString(), int.Parse(DropDownList1.SelectedValue.ToString()), " 发货单号:" + SentNum.Text.ToString(), cost)) { Jscript.RefreshParent(Label4.Text.ToString()); Jscript.CloseWindow(); } else { Jscript.AjaxAlert(this, "操作失败!"); return; } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { if (Session["Admin"] == null) { string validatecode = this.CheckCode.Value; string codeincookie = (HttpContext.Current.Request.Cookies["CheckCode"] == null) ? "a" : HttpContext.Current.Request.Cookies["CheckCode"].Value; if (codeincookie != validatecode) { //Jscript.Alert("验证码过期或者输入错误!"); ClientScript.RegisterClientScriptBlock(this.GetType(), "errorOfvc", "<script>alert('验证码过期或者输入错误!')</script>"); //Jscript.RefreshOpener(); //Jscript.AlertAndRefreshParent("验证码过期或者输入错误!", "Default.aspx"); return; } string username = vldInput(this.LoginName.Value.Trim()); string pwd = this.LoginPassword.Value; pwd = StringUtil.EncryptPassword(pwd, "MD5"); DataAccess da = new DataAccess(); string loginIP = (HttpContext.Current.Request.ServerVariables["HTTP_VIA"] != null) ? HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString() : HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString(); string strsql = "select id,username,adminpurview,supertype from tm_Admin where username='******' or pwd='" + pwd + "' and isUsed=1"; DataTable dt = da.GetTable(strsql); if (dt.Rows.Count == 0) { //Jscript.Alert("对不起,你输入的账号或密码错误!"); ClientScript.RegisterClientScriptBlock(this.GetType(), "errorOfpwd", "<script>alert('对不起,你输入的账号或密码错误!')</script>"); //Jscript.AlertAndRefreshParent("对不起,你输入的账号或密码错误!", "Default.aspx"); return; } Session.Clear(); Session["Admin"] = dt.Rows[0][1].ToString(); Session["AdminPurview"] = dt.Rows[0][2].ToString(); Session["AdminType"] = dt.Rows[0][3].ToString(); strsql = "update tm_Admin set Logintimes=Logintimes+1,lastloginip='" + loginIP + "',lastlogintime=getdate() where id=" + dt.Rows[0][0].ToString(); da.RunSql(strsql); //string oldurl = Request.ServerVariables["HTTP_Referer"]; //if (oldurl == null || oldurl.ToLower().Contains("login_xk")) //oldurl = "SMN_VIP.aspx"; //Jscript.Alert(Request.RawUrl); } Jscript.RefreshParent("Main.aspx"); }
protected void gotoList_Click(object sender, EventArgs e) { Jscript.RefreshParent(string.Format("Manager_SalesOutOrder.aspx?action=no&baginData={0}&endData={1}&side={2}", "1000", "3000", 2)); Jscript.CloseWindow(); }