protected void Delete_Click(object sender, EventArgs e) { SaveOrders mSave = new SaveOrders(); mSave.OrderID = tbxOrderID.Text; OAController mController = new OAController(); OA mOA = new OA(); arry = mController.SearchOrder(mOA, mSave); if (arry[12] == "2") { if (mOA.DeleteOrder(mSave)) { Tip.Text = "删除成功"; Response.Redirect("OA_OrderExam.aspx"); } else { Tip.Text = "删除失败"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ggg", "<script language='javascript'>alert('" + "删除失败!!" + "');</script>"); } } else { Tip.Text = "订单未取消,不能删除"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ggg", "<script language='javascript'>alert('" + "删除失败!!" + "');</script>"); } }
public string this[int idx] { get { if (idx >= Names.Length || idx < 0) { throw new IndexOutOfRangeException(); } switch (idx) { case 0: return(OA.ToString() + ", " + OB.ToString() + ", " + OC.ToString()); case 1: return(Sum_of_edge_lengths().ToString()); case 2: return(Volume().ToString()); case 3: return(SurfaceArea().ToString()); default: return(null); } } }
protected void Page_Load(object sender, EventArgs e) { OA mOA = new OA(); int Sum = mOA.GetNotDeal(); LTotalDeal.Text = "未处理订单数为:" + Sum.ToString(); }
private void Insert(OA.BoardModel board) { if (oaservice.BBS_Board_Insert(board) > 0) { Response.Write("<script>alert('添加成功!');</script>"); Response.Write("<script>window.location='BoardNew.aspx';</script>"); } else { Response.Write("<script>alert('添加失败!请与管理员联系!')</script>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { OA mOA = new OA(); int PageSum = mOA.GetPages(); ShowPages.Text = "第" + (CurrentPage + 1).ToString() + "页/共" + PageSum + "页"; this.OrderList.DataSource = mOA.DivideShow(CurrentPage); this.OrderList.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ViewState["surrentPage"] = 0; OA mOA = new OA(); int PageSum = mOA.GetPages(); ShowPages.Text = "第" + (Convert.ToInt32(ViewState["surrentPage"]) + 1).ToString() + "页/共" + PageSum + "页"; divide mdv = new divide(); this.OrderList.DataSource = mdv.OrderShow(Convert.ToInt32(ViewState["surrentPage"])); this.OrderList.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { OAController mOACon = new OAController(); OA obj = new OA(); OA OAdmin = new OA(); if (Session["hUserName"] != null) { obj.UserName = Session["hUserName"].ToString(); OAdmin = mOACon.ReadOAInfo(obj); txtStaffID.Text = OAdmin.StaffID.ToString(); txtPassword.Text = OAdmin.PassWord; tbxUserName.Text = Session["hUserName"].ToString(); tbxTrueName.Text = OAdmin.TrueName; tbxIDcardNum.Text = OAdmin.IdCardNum; tbxAddTime.Text = OAdmin.AddTime; char flag = OAdmin.StaffType; switch (flag) { case '1': txtAdministratorClass.Text = "高级管理员"; break; case '2': txtAdministratorClass.Text = "订单管理员"; break; case '3': txtAdministratorClass.Text = "评价管理员"; break; case '4': txtAdministratorClass.Text = "用户管理员"; break; case '5': txtAdministratorClass.Text = "商品管理员"; break; default: txtAdministratorClass.Text = "系统错误!!"; break; } } } }
protected void Last_Click(object sender, EventArgs e) { if (CurrentPage > 0) { CurrentPage--; OA mOA = new OA(); int PageSum = mOA.GetPages(); ShowPages.Text = "第" + (CurrentPage + 1).ToString() + "页/共" + PageSum + "页"; this.OrderList.DataSource = mOA.DivideShow(CurrentPage); this.OrderList.DataBind(); } else { this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language=javascript>alert('已经是第一页了!!')</script>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["hOrderID"] != null) { tbxOrderID.Text = Session["hOrderID"].ToString(); } SaveOrders hOrder = new Models.SaveOrders(); hOrder.OrderID = tbxOrderID.Text; OA mOrder = new OA(); OAController mController = new OAController(); arry = mController.SearchOrder(mOrder, hOrder); tbxAddress.Text = arry[1]; tbxCalloffReason.Text = arry[7]; tbxEndTime.Text = arry[9]; tbxNumber.Text = arry[2]; tbxSendTime.Text = arry[8]; tbxStaffID.Text = arry[10]; tbxSubmitTime.Text = arry[5]; tbxToTalPrice.Text = arry[3]; tbxUserID.Text = arry[0]; switch (arry[6]) { case "0": //TradeStatus.SelectedIndex = 0; this.lblTradeStatus.Text = "买家未付款"; break; case "1": //TradeStatus.SelectedIndex = 1; this.lblTradeStatus.Text = "买家付款"; break; case "2": // TradeStatus.SelectedIndex = 2; this.lblTradeStatus.Text = "商城发货"; break; case "3": //TradeStatus.SelectedIndex = 3; this.lblTradeStatus.Text = "交易完成"; break; } } Session["hOrder"] = ""; }
public int CompareTo(object _obj) { Parallepiped obj = (Parallepiped)_obj; switch (sortBy) { case eSortBy.Sum_of_edge_lengths: return((OA.Length() + OB.Length() + OC.Length()).CompareTo(obj.OA.Length() + obj.OB.Length() + obj.OC.Length())); case eSortBy.SurfaceArea: return(SurfaceArea().CompareTo(obj.SurfaceArea())); case eSortBy.Volume: return(Volume().CompareTo(obj.Volume())); } throw new Exception(); }
/// <summary> /// 上一页 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void last_Click(object sender, EventArgs e) { if (Convert.ToInt32(ViewState["surrentPage"]) > 0) { ViewState["surrentPage"] = Convert.ToInt32(ViewState["surrentPage"]) - 1; divide mdv = new divide(); this.OrderList.DataSource = mdv.OrderShow(Convert.ToInt32(ViewState["surrentPage"])); this.OrderList.DataBind(); } else { this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + "已经是第一页!!" + "');</script> "); } OA mOA = new OA(); int PageSum = mOA.GetPages(); ShowPages.Text = "第" + (Convert.ToInt32(ViewState["surrentPage"]) + 1).ToString() + "页/共" + PageSum + "页"; }
static void Main(string[] args) { System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); ConfigurationManager.Build(new string[] { "appsettings.json", "appsettings.development.json" }, Directory.GetCurrentDirectory()); //var sb = ConfigurationManager.Configuration["PersistToMySQL"]; // args =new string[]{ "app=sendEmail", @"template=\\fnp1423mp01.lowes.com\Data1\SHARE\EVERYONE\C-QA\Operation Team\Email Template\IA_Template_Reject.msg","[email protected]", "content=json", "[email protected]", @"text={""Error1"":""F3"",""Error2"":""Factory is not inspection allow""}","subject=233", @"resultMap=\\fnp1423mp01.lowes.com\Data1\SHARE\EVERYONE\C-QA\Operation Team\Email Template\invalidStatusMapping.yaml" }; var argsMap = args.Select(e => e.Split("=")).Where(e => !String.IsNullOrWhiteSpace(e[0])).ToDictionary(prop => prop[0], prop => prop.Length > 1?String.Join('=', prop.Skip(1)):""); if (argsMap.Keys.Contains("app")) { switch (argsMap["app"]) { case "sendEmail": if (argsMap.ContainsKey("yaml")) { var yaml = new YamlStream(); using (var sr = new FileInfo(argsMap["yaml"]).OpenText()) yaml.Load(sr); OA.sendEmail(((YamlMappingNode)yaml.Documents[0].RootNode).Children.Select(entry => new KeyValuePair <string, string>(entry.Key.ToString(), entry.Value.ToString())).ToDictionary(prop => prop.Key, prop => prop.Value)); } else { OA.sendEmail(argsMap); } break; case "automateEmail": if (argsMap.ContainsKey("path")) { OA.StartOAHelper(argsMap["path"]); } else { Console.WriteLine("Please provide path to configuration yaml files!"); } break; } } else { Console.WriteLine("Please provide arguments!"); } //OA.StartOAHelper(); }
/// <summary> /// 查询订单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Enter_Click(object sender, EventArgs e) { if (tbxOrderID.Text != null) { Session["hOrderID"] = tbxOrderID.Text; OA mExam = new OA(); SaveOrders hOrder = new SaveOrders(); hOrder.OrderID = Session["hOrderID"].ToString(); OAController mCon = new OAController(); if (mCon.OrderExamController(mExam, hOrder)) { this.Response.Redirect("OA_OrderInfoma.aspx"); } else { this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ggg", "<script language='javascript'>alert('" + "此订单不存在!!" + "');</script>"); } } }
protected void btnAlter_Click(object sender, EventArgs e) { OAController mCon = new OAController(); OA mOA = new OA(); if (Session["hUserName"] != null) { mOA.UserName = Session["hUserName"].ToString(); if (tbxTrueName.Text != "" && tbxIDcardNum.Text != "" && txtPassword.Text != "") { mOA.TrueName = tbxTrueName.Text; mOA.IdCardNum = tbxIDcardNum.Text; mOA.PassWord = txtPassword.Text; if (mCon.AlterInfo(mOA) == true) { tbxTrueName.Text = mOA.TrueName; tbxIDcardNum.Text = mOA.IdCardNum; txtPassword.Text = mOA.PassWord; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ggg", "<script language='javascript'>alert('" + "信息修改成功!!" + "');</script>"); this.lblCheck.Text = "修改成功!"; } else { this.lblCheck.Text = "修改失败!"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ggg", "<script language='javascript'>alert('" + "未做任何修改!!" + "');</script>"); } } else { this.lblCheck.Text = "修改信息内容不能为空!"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ggg", "<script language='javascript'>alert('" + "修改信息内容不能为空!!" + "');</script>"); } } }
/// <summary> /// 查询订单 /// </summary> /// <param name="mOrder"></param> /// <param name="order"></param> /// <returns></returns> public string [] SearchOrder(OA mOrder, SaveOrders order) { return(mOrder.OrderInfoRead(order)); }
public float Sum_of_edge_lengths() { return(4 * (OA.Length() + OB.Length() + OC.Length())); }
protected void Alter_Click(object sender, EventArgs e) { if (Session["hUserName"] != null) { StrUserName = Session["hUserName"].ToString(); } OA m = new OA(); SaveOrders status = new SaveOrders(); Admins madmin = new Admins(); madmin.UserName = StrUserName; madmin.StaffID = Admins.UserNameGetStaffID(madmin); status.StaffID = madmin.StaffID; status.TradeStatus = Convert.ToChar(Status); if (Status == "3") { TradeStatus.Enabled = false; } if (Session["hOrderID"] != null) { tbxOrderID.Text = Session["hOrderID"].ToString(); } else { tbxOrderID.Text = receive; } status.OrderID = tbxOrderID.Text; if (tbxNumber.Text == null) { tbxNumber.Text = "0"; } else { status.Number = Convert.ToInt32(tbxNumber.Text); } status.Number = Convert.ToInt32(tbxNumber.Text); status.SingleGoodID = Convert.ToInt32(Session["SingleGoodID"]); status.IsDeal = Deal; OAController mCon = new OAController(); if (Status == "3") { status.TotalPrices = Convert.ToDouble(tbxToTalPrice.Text); status.ReceiveStr = tbxUserID.Text; //将用户用户名传入 } if (mCon.TradeStatus(m, status) && mCon.GetTimeCon(m, status)) { Tip.Text = "修改成功"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ggg", "<script language='javascript'>alert('" + "修改成功!!" + "');</script>"); } else { Tip.Text = "修改失败"; //this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ggg", "<script language='javascript'>alert('" + "修改失败!!" + "');</script>"); } //读取数据代码 { if (Session["hOrderID"] != null) { tbxOrderID.Text = Session["hOrderID"].ToString(); } else { tbxOrderID.Text = receive; } SaveOrders hOrder = new Models.SaveOrders(); hOrder.OrderID = tbxOrderID.Text; OA mOrder = new OA(); OAController mController = new OAController(); arry = mController.SearchOrder(mOrder, hOrder); tbxAddress.Text = arry[1]; tbxCalloffReason.Text = arry[7]; tbxEndTime.Text = arry[9]; tbxNumber.Text = arry[2]; tbxSendTime.Text = arry[8]; tbxStaffID.Text = arry[10]; tbxSubmitTime.Text = arry[5]; tbxToTalPrice.Text = arry[3]; tbxUserID.Text = arry[0]; switch (arry[6]) { case "0": TradeStatus.SelectedIndex = 0; break; case "1": TradeStatus.SelectedIndex = 1; break; case "2": TradeStatus.SelectedIndex = 2; break; case "3": TradeStatus.SelectedIndex = 3; break; } } }
private void Update(OA.BoardModel board) { if (oaservice.BBS_Board_Update(board) > 0) { Response.Write("<script>alert('修改成功!');</script>"); Response.Write("<script>window.location='BoardManage.aspx';</script>"); } else { Response.Write("<script>alert('修改失败!请与管理员联系!')</script>"); } }
protected void Page_Load(object sender, EventArgs e) { string str = Request.QueryString["OrderID"]; receive = str; if (!IsPostBack) { if (Session["hOrderID"] != null) { tbxOrderID.Text = Session["hOrderID"].ToString(); } else { tbxOrderID.Text = str; } SaveOrders hOrder = new Models.SaveOrders(); OA mOrder = new OA(); OAController mController = new OAController(); hOrder.OrderID = tbxOrderID.Text; arry = mController.SearchOrder(mOrder, hOrder); if (arry[6] == "3") { TradeStatus.Enabled = false; } hOrder.IsDeal = arry[12]; if (hOrder.IsDeal == "2") { this.TradeStatus.Enabled = false; } tbxAddress.Text = arry[1]; tbxCalloffReason.Text = arry[7]; tbxEndTime.Text = arry[9]; tbxNumber.Text = arry[2]; tbxSendTime.Text = arry[8]; tbxStaffID.Text = arry[10]; tbxSubmitTime.Text = arry[5]; tbxToTalPrice.Text = arry[3]; tbxUserID.Text = arry[0]; Session["SingleGoodID"] = arry[4]; switch (arry[6]) { case "0": TradeStatus.SelectedIndex = 0; break; case "1": TradeStatus.SelectedIndex = 1; break; case "2": TradeStatus.SelectedIndex = 2; break; case "3": TradeStatus.SelectedIndex = 3; break; } Session["hOrder"] = ""; } }
/// <summary> /// 查看订单管理员信息 /// </summary> /// <param name="OAdmin"></param> /// <returns></returns> public OA ReadOAInfo(OA OAdmin) { return(OAdmin.OAInfoRead()); }
/// <summary> /// 获取订单状态时间 /// </summary> /// <param name="hOA"></param> /// <param name="Get"></param> /// <returns></returns> public bool GetTimeCon(OA hOA, SaveOrders Get) { return(hOA.GetTradeTime(Get)); }
/// <summary> /// 订单状态修改 /// </summary> /// <param name="m"></param> /// <param name="mStatus"></param> /// <returns></returns> public bool TradeStatus(OA m, SaveOrders mStatus) { return(m.AlterOrderStatus(mStatus)); }
/// <summary> /// 验证订单号 /// </summary> /// <param name="mExam"></param> /// <param name="dOrder"></param> /// <returns></returns> public bool OrderExamController(OA mExam, SaveOrders dOrder) { return(mExam.OrderExam(dOrder)); }
public override string ToString() { return(OA.ToString() + '|' + OB.ToString() + '|' + OC.ToString()); }
/// <summary> /// 修改订单管理员信息 /// </summary> /// <param name="mAlter"></param> /// <returns></returns> public bool AlterInfo(OA mAlter) { return(mAlter.AlterOAInfo()); }