protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (e.SelectValue != "") { tr_OrganizeCity.SelectValue = new CM_ClientBLL(int.Parse(e.SelectValue)).Model.OrganizeCity.ToString(); } }
protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { bt_Generate.Enabled = false; if (select_Client.SelectValue != "") { IList <CM_Contract> lists = CM_ContractBLL.GetModelList("Client=" + select_Client.SelectValue + " AND State=3"); if (lists.Count == 0) { MessageBox.Show(this, "对不起,该客户没有可以申请费用的租赁协议!"); return; } foreach (CM_Contract contract in lists) { CM_ContractBLL bll = new CM_ContractBLL(contract.ID); if (bll.Items.Count == 0) { continue; } if (bll.Items[0]["PayEndDate"] == "" || DateTime.Parse(bll.Items[0]["PayEndDate"]) < contract.EndDate) { ddl_Contract.Items.Add(new ListItem("合同编号:" + contract["Code"] + " [" + contract.BeginDate.ToString("yyyy-MM-dd") + "至" + contract.EndDate.ToString("yyyy-MM-dd") + "]", contract.ID.ToString())); } } if (ddl_Contract.Items.Count > 0) { ddl_Contract_SelectedIndexChanged(null, null); bt_Generate.Enabled = true; } } }
protected void select_MobileStaff_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { int staffid = 0; if (int.TryParse(select_MobileStaff.SelectValue, out staffid) && staffid > 0) { Org_Staff staff = new Org_StaffBLL(staffid).Model; if (staff != null) { if (string.IsNullOrEmpty(staff["ManageInfo11"])) { staff["ManageInfo11"] = "0"; } decimal applycost = 0; decimal.TryParse(staff["ManageInfo11"], out applycost); lb_MobileNumber.Text = staff["Mobile"]; lb_MobileApplyCost.Text = applycost.ToString("0.##"); tbx_MobileCost.Text = lb_MobileApplyCost.Text; if (applycost > 0) { bt_AddMobileFee.Enabled = true; } } } else { bt_AddMobileFee.Enabled = false; } }
protected void select_Retailer_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (select_Client.SelectValue != "") { bt_Find_Click(null, null); } }
protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (e.SelectValue != "") { tr_OrganizeCity.SelectValue = new CM_ClientBLL(int.Parse(e.SelectValue)).Model.OrganizeCity.ToString(); //select_Client.PageUrl = "../CM/PopSearch/Search_SelectClient.aspx?ClientType=2&&OrganizeCity=" + tr_OrganizeCity.SelectValue; } }
protected void select_Staff_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (select_Staff.SelectValue != "") { ddl_InvoiceClassAB.Enabled = false; select_Client.Enabled = false; select_Client.ToolTip = "费用代垫对像不能同时为经销商与员工"; } }
protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { tr_OrganizeCity.SelectValue = new CM_ClientBLL(int.Parse(select_Client.SelectValue)).Model.OrganizeCity.ToString(); Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue)); ddl_StandardPrice.DataSource = PDT_StandardPriceBLL.GetModelList("ActiveFlag=1 AND ApproveFlag=1 AND ID IN (SELECT StandardPrice FROM PDT_StandardPrice_ApplyCity WHERE OrganizeCity IN (" + orgcity.GetAllSuperNodeIDs() + "," + tr_OrganizeCity.SelectValue + ")) "); ddl_StandardPrice.DataBind(); ddl_StandardPrice.Items.Insert(0, new ListItem("请选择....", "0")); ddl_StandardPrice.SelectedValue = "0"; }
protected void select_Supplier_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (e.SelectValue != "") { tr_OrganizeCity.SelectValue = new CM_ClientBLL(int.Parse(e.SelectValue)).Model.OrganizeCity.ToString(); select_Client.PageUrl = "../CM/PopSearch/Search_SelectClient.aspx?ExtCondition=\"Supplier = " + e.SelectValue + "\""; select_Client.SelectValue = ""; select_Client.SelectText = ""; } }
protected void select_applyStaff_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (select_applyStaff.SelectValue != "") { select_Client.Enabled = false; select_Client.ToolTip = "费用申请为员工时费用不能由经销商代垫"; select_ApplyClient.Enabled = false; select_ApplyClient.ToolTip = "费用申请对像不能同时为经销商与员工"; } }
protected void select_OrgSupplier_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (select_OrgSupplier.SelectValue != "") { CM_Client client = new CM_ClientBLL(int.Parse(select_OrgSupplier.SelectValue)).Model; if (client != null) { lb_Prompt.Text = "注意:该操作将会替换原" + ((int)ViewState["Supplier"] != 0?"成品":"赠品") + "供货商为【" + client.FullName + "】的所有客户(含分销商及零售商),请小心操作!"; } } }
protected void select_OrgClientManager_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (select_OrgClientManager.SelectValue != "") { Org_Staff staff = new Org_StaffBLL(int.Parse(select_OrgClientManager.SelectValue)).Model; if (staff != null) { lb_Prompt.Text = "注意:该操作将会替换所有原客户经理为【" + staff.RealName + "】的" + ((int)ViewState["ClientType"] == 2 ? "经销商" : "零售商") + ",请小心操作!"; } } }
protected void select_PlanStaff_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (!string.IsNullOrEmpty(select_PlanStaff.SelectValue)) { Org_Staff staff = new Org_StaffBLL(int.Parse(select_PlanStaff.SelectValue)).Model; tr_OfficailCity.SelectValue = staff.OfficialCity.ToString(); tr_OrganizeCity.SelectValue = staff.OrganizeCity.ToString(); tr_OrganizeCity_Selected(null, null); ViewState["StaffOfficialCity"] = staff.OfficialCity; } }
protected void select_OrgSupplier_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { int client = 0; int.TryParse(select_OrgSupplier.SelectValue, out client); CM_ClientBLL _bll = new CM_ClientBLL(client); if (_bll.Model != null) { rbl_IsMYD.SelectedValue = _bll.Model["Classification"] == "4" ? "1" : "2"; } }
protected void select_Staff_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (!string.IsNullOrEmpty(select_Staff.SelectValue)) { ViewState["Staff"] = int.Parse(select_Staff.SelectValue); } else { MessageBox.Show(this, "请选择要查看的员工!"); return; } }
protected void select_ApplyClient_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { lbl_MasterApplyClient.Text = ""; int id = 0; if (int.TryParse(select_ApplyClient.SelectValue, out id) && id > 0) { lbl_MasterApplyClient.Text = GetRleatClient(id, false); select_applyStaff.Enabled = false; select_applyStaff.ToolTip = "费用申请对像不能同时为经销商与员工"; } }
protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (e.SelectValue != "" && e.SelectValue != "0") { CM_ClientBLL _bll = new CM_ClientBLL(int.Parse(e.SelectValue)); if (_bll.Model["LastMonthIsRMSClient"] == "1") { bt_BatchInput.Visible = false; bt_BatchInput2.Visible = false; } tr_OrganizeCity.SelectValue = _bll.Model.OrganizeCity.ToString(); } }
protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (e.SelectValue != "" && (int)ViewState["Type"] == 1) { if (ViewState["SalesFlag"] == null) { Response.Redirect("SalesVolumeList.aspx?Type=1&SellInClientID=" + e.SelectValue); } else { Response.Redirect("SalesVolumeList.aspx?Type=1&SellInClientID=" + e.SelectValue + "&SalesFlag=" + ViewState["SalesFlag"].ToString()); } } }
protected void select_RelateClient_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { if (!string.IsNullOrEmpty(select_RelateClient.SelectValue)) { int client = int.Parse(select_RelateClient.SelectValue); CM_Client c = new CM_ClientBLL(client).Model; if (c != null && c.OfficalCity != 0) { tr_OfficailCity.SelectValue = c.OfficalCity.ToString(); tr_OfficailCity.Enabled = false; } } }
protected void select_ProductCode_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { int id = 0; int.TryParse(e.SelectValue, out id); if (id > 0) { PDT_Product _product = new PDT_ProductBLL(id).Model; if (BindProduct(_product)) { BindGrid(); } } }
protected void select_Product_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { int product = 0; int.TryParse(select_Product.SelectValue, out product); if (product != 0) { PDT_ProductBLL productbll = new PDT_ProductBLL(product); if (productbll.Model == null) { return; } rbl_ln_SelectedIndexChanged(null, null); } }
protected void select_Product_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { int product = 0; int.TryParse(select_Product.SelectValue, out product); //int.TryParse(RadComboBox1.SelectedValue, out product); if (product != 0) { PDT_ProductBLL productbll = new PDT_ProductBLL(product); if (productbll.Model == null) { return; } PDT_Product p = productbll.Model; Dictionary <string, Dictionary_Data> dic = DictionaryBLL.GetDicCollections("PDT_Packaging"); string _T = dic[p.TrafficPackaging.ToString()].Name; string _P = dic[p.Packaging.ToString()].Name; #region 显示产品包装信息 lb_TrafficPackagingName.Text = "元/" + _T + "(" + p.ConvertFactor.ToString() + _P + ")"; #endregion #region 获取销售该门店的价格 decimal saleprice = PDT_StandardPriceBLL.GetSalePrice((int)ViewState["Client"], (int)Session["OwnerClient"], product); if (saleprice > 0) { if (ddl_Unit.SelectedValue == "T") { tbx_Price.Text = (saleprice * p.ConvertFactor).ToString("0.###"); } else { tbx_Price.Text = saleprice.ToString("0.###"); } //tbx_Price.Enabled = false; } else { tbx_Price.Text = "0"; //tbx_Price.Enabled = true; } #endregion } }
protected void select_Receiver_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { LoadGiftApplyAmount(); //int receiver = 0; //int.TryParse(select_Receiver.SelectValue, out receiver); //if (receiver > 0) //{ // IList<CM_DIAddressID> _addressList = CM_ClientBLL.GetAddressByClient(receiver); // ddl_Address.DataSource = _addressList; // ddl_Address.DataBind(); // if (_addressList.Count == 0) // { // ddl_Address.Items.Insert(0, new ListItem("当前收货经销商无对应收货地址", "0")); // } //} }
protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { bt_Generate.Enabled = true; int organizecity = 0; int client = 0; int month = 0; int.TryParse(tr_OrganizeCity.SelectValue, out organizecity); int.TryParse(select_Client.SelectValue, out client); int.TryParse(ddl_Month.SelectedValue, out month); DataTable promotors = PM_PromotorBLL.GetByDIClient(organizecity, client, month); if (promotors.Select("ErrType=2").Count() > 0) { promotors.DefaultView.RowFilter = "ErrType=2"; gv_List.DataSource = promotors.DefaultView.ToTable(); gv_List.DataBind(); gv_Table.Visible = true; bt_Generate.Enabled = false; MessageBox.Show(this, "对不起,有部分导购员的薪酬定义没有正确维护,请正确设定薪酬定义信息后,再生成工资!"); } if (promotors.Select("ErrType=3").Count() > 0) { promotors.DefaultView.RowFilter = "ErrType=3"; gv_List.DataSource = promotors.DefaultView.ToTable(); gv_List.DataBind(); gv_Table.Visible = true; bt_Generate.Enabled = false; MessageBox.Show(this, "对不起,片区内有导购专兼职转换流程未完成,需审批完成后才可生成工资(生成工资前请到奖惩设定与调整项中刷新提成)!"); } if (promotors.Select("ErrType=1").Count() > 0) { promotors.DefaultView.RowFilter = "ErrType=1"; gv_List.DataSource = promotors.DefaultView.ToTable(); gv_List.DataBind(); gv_Table.Visible = true; MessageBox.Show(this, "以下导购员所在门店已生成返利费用或有生效返利协议,不能生成工资,请确认是否排除这些导购?"); } }
protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { LoadGiftApplyAmount(); select_Receiver.SelectText = ""; select_Receiver.SelectValue = "0"; int client = 0; int.TryParse(select_Client.SelectValue, out client); int OrganizePartCity_Level = ConfigHelper.GetConfigInt("OrganizePartCity-CityLevel"); if (client > 0) { CM_ClientBLL _cmbll = new CM_ClientBLL(client); if (_cmbll != null && TreeTableBLL.GetSuperIDByLevel("MCS_SYS.dbo.Addr_OrganizeCity", _cmbll.Model.OrganizeCity, OrganizePartCity_Level) != TreeTableBLL.GetSuperIDByLevel("MCS_SYS.dbo.Addr_OrganizeCity", int.Parse(tr_OrganizeCity.SelectValue), OrganizePartCity_Level)) { MessageBox.Show(this, "该经销商不在本营业部内,不能为其申请赠品订单,请重新选择经销商!"); select_Client.SelectText = ""; select_Client.SelectValue = ""; return; } if (_cmbll != null && _cmbll.Model.FullName.Contains("[ERP已撤消]")) { MessageBox.Show(this, "该经销商在ERP中已撤销,请重新选择经销商!"); select_Client.SelectText = ""; select_Client.SelectValue = ""; return; } select_Receiver.Enabled = true; select_Receiver.PageUrl = "~/SubModule/CM/PopSearch/Search_SelectClient.aspx?ClientType=2&OrganizeCity=" + tr_OrganizeCity.SelectValue + "&ExtCondition=\"(CM_Client.ID=" + select_Client.SelectValue + "$OR$Supplier=" + select_Client.SelectValue + ")$AND$MCS_SYS.dbo.UF_Spilt2(~MCS_CM.dbo.CM_Client~,CM_Client.ExtPropertys,~DIClassify~)<>~2~\""; } else { select_Receiver.Enabled = false; } }
protected void select_Staff_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { ProdutctGifts = new StringBuilder(); Testers = new StringBuilder(); Gifts = new StringBuilder(); #region 获取最迟的销量日期 AC_AccountMonth month = (AC_AccountMonth)ViewState["month"]; DateTime day = DateTime.Today < month.EndDate ? DateTime.Today : month.EndDate; #endregion #region 判断有无选择业代 if (string.IsNullOrEmpty(select_Staff.SelectValue) || select_Staff.SelectValue == "0") { MessageBox.Show(this, "对不起,请选择责任业代!"); return; } #endregion #region 获取业代负责的零售商及所有产品数据 int staff = int.Parse(select_Staff.SelectValue); string condtion = ViewState["ClientType"].ToString() == "2" ? " AND MCS_SYS.dbo.UF_Spilt(ExtPropertys,'|',7)='2'" : ""; IList <CM_Client> clientlists = CM_ClientBLL.GetModelList("ClientType=" + ViewState["ClientType"].ToString() + " AND ClientManager=" + staff.ToString() + " AND ActiveFlag=1 AND ApproveFlag=1 " + condtion + "AND OpenTime<'" + day.ToString("yyyy-MM-dd") + " 23:59:59' ORDER BY Code"); if (clientlists.Count == 0) { if (sender != null) { MessageBox.Show(this, "对不起,没有当前人直接负责的客户!"); } return; } #endregion if ((int)ViewState["IsOpponent"] == 9) { BindProductGrid(); } }
protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { ddl_LinkMan.Items.Clear(); int client = 0; if (int.TryParse(select_Client.SelectValue, out client) && client > 0) { IList <CM_LinkMan> lists = CM_LinkManBLL.GetModelList("ClientID = " + client.ToString()); foreach (CM_LinkMan item in lists) { ddl_LinkMan.Items.Add(new ListItem(item.Name, item.ID.ToString())); } CM_ClientBLL clientbll = new CM_ClientBLL(client); decimal forcast = clientbll.GetSalesForcast((int)ViewState["AccountMonth"]); tbx_SalesForcast.Text = forcast.ToString("0.##"); tbx_SalesForcast.ReadOnly = forcast > 0; lb_PreSalesVolume.Text = clientbll.GetSalesVolume(AC_AccountMonthBLL.GetCurrentMonth() - 1).ToString("0.##元"); lb_AvgSalesVolume.Text = clientbll.GetSalesVolumeAvg().ToString("0.##元"); } ddl_LinkMan.Items.Insert(0, new ListItem("请选择", "0")); }
protected void select_Product_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { int product = 0; int.TryParse(select_Product.SelectValue, out product); //int.TryParse(RadComboBox1.SelectedValue, out product); if (product != 0) { PDT_ProductBLL productbll = new PDT_ProductBLL(product); if (productbll.Model == null) { return; } PDT_Product p = productbll.Model; Dictionary <string, Dictionary_Data> dic = DictionaryBLL.GetDicCollections("PDT_Packaging"); string _T = dic[p.TrafficPackaging.ToString()].Name; string _P = dic[p.Packaging.ToString()].Name; #region 显示批号及库存信息 ddl_LotNumber.Items.Clear(); //调拨,仅获取指定仓库可销售的批号 foreach (INV_Inventory item in INV_InventoryBLL.GetInventoryListByProduct((int)ViewState["WareHouse"], product).OrderBy(t => t.LotNumber)) { string invstr = (item.Quantity / p.ConvertFactor).ToString() + _T; if (item.Quantity % p.ConvertFactor > 0) { invstr += " " + (item.Quantity % p.ConvertFactor).ToString() + _P; } ddl_LotNumber.Items.Add(new ListItem((item.LotNumber == "" ? "无批号" : item.LotNumber) + " -【库存量:" + invstr + "】", item.LotNumber)); } if (ddl_LotNumber.Items.Count == 0) { ddl_LotNumber.Items.Add(new ListItem("无批号", "")); } ddl_LotNumber_SelectedIndexChanged(null, null); #endregion #region 显示产品包装信息 lb_TrafficPackagingName.Text = "元/" + _T + "(" + p.ConvertFactor.ToString() + _P + ")"; #endregion #region 调拨价格为商品默认销售价 decimal saleprice = 0; try { saleprice = productbll.GetProductExtInfo((int)Session["OwnerClient"]).SalesPrice; } catch { } if (saleprice > 0) { if (ddl_Unit.SelectedValue == "T") { tbx_Price.Text = (saleprice * p.ConvertFactor).ToString("0.###"); } else { tbx_Price.Text = saleprice.ToString("0.###"); } tbx_Price.Enabled = false; } else { tbx_Price.Text = "0"; tbx_Price.Enabled = true; } #endregion } }
protected void select_ProductCode_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { PDT_Product p = new PDT_ProductBLL(e.SelectValue).Model; BindProduct(p); }
protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { GetGiftAmountBalance(); }
protected void select_ProductCode_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e) { PDT_Product _product = new PDT_ProductBLL(select_ProductCode.SelectText).Model; BindProduct(_product); }