/// <summary> /// /// </summary> /// <param name="fid"></param> void BindDetail(int fid) { Model.FatherOrder modelorder = bllFathrt.GetModel(fid); ddlCustomer.SelectedValue = modelorder.CustomerId.ToString(); BindAddress(int.Parse(modelorder.CustomerId.ToString())); List <Model.OrdeDistribution> modelOD = bllOrderDistribution.GetModelList("OrderId=" + fid); ddlAddress.SelectedValue = modelorder.AddressId.ToString(); ddlDelivery.SelectedValue = modelOD[0].TypeId.ToString(); BindDeliverystaff(modelOD[0].TypeId); if (modelOD[0].TypeId == 10018) { ddlDeliverystaff.SelectedValue = modelOD[0].WorkersId.ToString(); } if (modelOD[0].TypeId == 10019) { ddlDeliverystaff.SelectedValue = modelOD[0].DistributionId.ToString(); } txtDeliveryNum.Text = modelOD[0].DistributionNum; ddlPriceType.SelectedValue = modelOD[0].PriceType.ToString(); txtExplain.Text = modelorder.Remark; checkorder = ""; }
/// <summary> /// 设置公司订单编号 /// </summary> /// <param name="id"></param> /// <returns></returns> public string SetFathrtNumID() { StringBuilder strNumId = new StringBuilder("OAO"); strNumId.Append(DateTime.Now.ToString("yyMMdd")); Model.FatherOrder model = bllFathrt.GetModel(bllFathrt.GetMaxId()); if (model != null) { strNumId.Append((int.Parse(model.NumId.Substring(model.NumId.Length - 4)) + 1).ToString().PadLeft(4, '0')); } else { strNumId.Append("0001"); } return(strNumId.ToString()); }
/// <summary> /// 标记为已付款 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtnMoney_Click(object sender, EventArgs e) { for (int i = 0; i < repList.Items.Count; i++) { CheckBox ckChecked = repList.Items[i].FindControl("ckChecked") as CheckBox; if (ckChecked.Checked) { HiddenField hidfid = repList.Items[i].FindControl("hidfid") as HiddenField; Model.FatherOrder model = bllorder.GetModel(int.Parse(hidfid.Value)); model.MoneyState = 1; bllorder.Update(model); } } BindRepList(); }
/// <summary> /// 绑定客户下拉列表 /// </summary> void BindCustomer(int fid) { Model.FatherOrder model = bllFathrt.GetModel(fid); Model.Customer modelcustomer = bllCustomer.GetModel(int.Parse(model.CustomerId.ToString())); DataSet ds = bllCustomer.GetList(0, "ParentId=" + modelcustomer.Id + " and StateInfo=1", "AddTime asc,Id asc"); if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow item in ds.Tables[0].Rows) { ddlCustomer.Items.Add(new ListItem(item["CompanyName"].ToString(), item["Id"].ToString())); } } else { ddlCustomer.Items.Add(new ListItem(modelcustomer.CompanyName, modelcustomer.Id.ToString())); } }