protected void Btn_Block_Click(object sender, EventArgs e) { string state = "2"; string idList = GetSelIDList(); if (idList.Trim().Length == 0) { return; } Model.Distribution distribution = new Model.Distribution(); BLL.DistributionManager manager = new BLL.DistributionManager(); manager.UpdateList(state, idList); Response.Write("<script language=javascript>alert('标记成功!')</script>"); NewBind(); HisBind(); Model.Feedback feedback = new Model.Feedback(); BLL.FeedbackManager Fmanager = new FeedbackManager(); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["GadminID"].ToString()); int ID = Convert.ToInt32(admin1.adminID); string Str1 = "solutionState='" + state + "'"; string Str2 = "adminID='" + ID + "'and state = '" + state + "'"; Fmanager.UpdateSolution(Str1, Str2); }
/// <summary> /// 添加订单配送信息 /// </summary> /// <param name="fathrtid">公司订单编号</param> void AddDistribution(int fathrtid) { Model.OrdeDistribution model = new Model.OrdeDistribution(); model.OrderId = fathrtid; model.PriceType = int.Parse(ddlPriceType.SelectedValue); model.TypeId = int.Parse(ddlDelivery.SelectedValue); model.WorkersId = int.Parse(Session["AdminId"].ToString()); model.Price = 0; switch (ddlType.SelectedValue) { case "10018": //公司配送 if (!string.IsNullOrEmpty(ddlDeliverystaff.SelectedValue)) { model.WorkersId = int.Parse(ddlDeliverystaff.SelectedValue); } break; case "10019": //快递信息 if (!string.IsNullOrEmpty(ddlDeliverystaff.SelectedValue)) { model.DistributionId = int.Parse(ddlDeliverystaff.SelectedValue); Model.Distribution modelDis = bllDistribution.GetModel(int.Parse(ddlDeliverystaff.SelectedValue)); model.Price = modelDis.Price; } break; } bllOrderDistribution.Add(model); }
protected void UpdateFeedback(object sender, EventArgs e) { Model.Distribution distribution = new Model.Distribution(); BLL.DistributionManager manager = new DistributionManager(); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["SadminID"].ToString()); string handlers = DropDownList_Distribution.SelectedItem.Text; Model.Feedback feedback = new Model.Feedback(); BLL.FeedbackManager Fmanager = new FeedbackManager(); feedback.feedbackID = Convert.ToInt32(Labeltest.Text.Trim()); feedback.handler = handlers; string Str1 = "handler='" + handlers + "'"; string Str2 = "feedbackID='" + Labeltest.Text.Trim() + "'"; bool bo2 = Fmanager.UpdateHandler(Str1, Str2); if (bo2 == true) { Response.Write("<script language=javascript>alert('修改成功!')</script>"); BindY(); BindN(); } }
protected void Btn_Distribution_Click(object sender, EventArgs e) { Model.Distribution distribution = new Model.Distribution(); BLL.DistributionManager manager = new DistributionManager(); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["SadminID"].ToString()); int s = Convert.ToInt32(admin1.adminID); distribution.feedbackID = Convert.ToInt32(Labeltest.Text); distribution.description = txtDistribution.Text.Trim(); distribution.adminID = Convert.ToInt32(DropDownList_Distribution.SelectedValue.ToString()); distribution.assignerID = s; distribution.state = "待处理"; bool bo = manager.Add(distribution); if (bo == true) { Response.Write("<script language=javascript>alert('分配成功!')</script>"); txtDistribution.Text = ""; DropDownList_Distribution.SelectedIndex = 0; UpdateFeedback(sender, e); BindY(); BindN(); } else { Response.Write("<script language=javascript>alert('分配失败!请重试')"); } }
/// <summary> /// 绑定合作快递详细信息 /// </summary> /// <param name="id"></param> void BindDetail(int id) { model = bll.GetModel(id); txtCompanyName.Text = model.CompanyName; txtNameInfo.Text = model.NameInfo; txtPhone.Text = model.ContactTel; txtPrice.Text = ((decimal)model.Price).ToString("0.00"); txtSortNum.Text = model.SortNum.ToString(); ckState.Checked = model.StateInfo == 1 ? true : false; }
protected void NewBind() { Model.Distribution distribution = new Model.Distribution(); BLL.DistributionManager manager = new BLL.DistributionManager(); BLL.AdminManager adminManager1 = new BLL.AdminManager(); Model.Admin admin1 = adminManager1.GetModel1(Session["GadminID"].ToString()); int ID = Convert.ToInt32(admin1.adminID); string Str = " adminID='" + ID + "'and state != '" + "1" + "'"; GridView1.DataSource = manager.GetList(Str); GridView1.DataBind(); }
/// <summary> /// 添加订单配送信息 /// </summary> /// <param name="fathrtid">公司订单编号</param> void AddDistribution(int fathrtid) { bool isEdit = false; Model.OrdeDistribution model = new Model.OrdeDistribution(); DataSet ds = bllOrderDistribution.GetList("OrderId=" + fathrtid); if (ds.Tables[0].Rows.Count > 0) { isEdit = true; model = bllOrderDistribution.GetModel(int.Parse(ds.Tables[0].Rows[0]["Id"].ToString())); } model.OrderId = fathrtid; model.PriceType = int.Parse(ddlPriceType.SelectedValue); model.TypeId = int.Parse(ddlDelivery.SelectedValue); model.DistributionNum = txtDeliveryNum.Text; model.Price = 0; switch (ddlDelivery.SelectedValue) { case "10018": //公司配送 if (!string.IsNullOrEmpty(Request.Form["ddlDeliverystaff"])) { model.WorkersId = int.Parse(Request.Form["ddlDeliverystaff"]); } break; case "10019": //快递信息 if (!string.IsNullOrEmpty(Request.Form["ddlDeliverystaff"])) { model.DistributionId = int.Parse(Request.Form["ddlDeliverystaff"]); Model.Distribution modelDis = bllDistribution.GetModel(int.Parse(Request.Form["ddlDeliverystaff"])); if (ddlPriceType.SelectedValue == "0") { model.Price = modelDis.Price; } } break; } if (isEdit) { bllOrderDistribution.Update(model); } else { bllOrderDistribution.Add(model); } }
/// <summary> /// 确认提交 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnOK_Click(object sender, EventArgs e) { bool isEdit = false; if (int.TryParse(Request.Params["id"], out id)) { model = bll.GetModel(id); isEdit = true; } model.CompanyName = txtCompanyName.Text; model.ContactTel = txtPhone.Text; model.NameInfo = txtNameInfo.Text; model.Price = decimal.Parse(txtPrice.Text); model.SortNum = int.Parse(txtSortNum.Text); model.StateInfo = ckState.Checked ? 1 : 0; if (!isEdit) { if (bll.Add(model) > 0) { JsMessage("合作快递添加成功", 2000, "true", "index.aspx"); } else { JsMessage("合作快递添加失败,请稍候重试", 2000, "false"); } } else { if (bll.Update(model)) { JsMessage("合作快递信息修改成功", 2000, "true", "index.aspx" + Request.Url.Query); } else { JsMessage("合作快递信息修改失败,请稍候重试", 2000, "false"); } } }
public int DistributionUpt(Model.Distribution Model) { throw new NotImplementedException(); }