/// <summary>入库储Changed事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void DDLStorageAuth_OnSelectedIndexChanged(object sender, EventArgs e) { //仓库id Guid warehouseId = string.IsNullOrEmpty(DDL_Waerhouse.SelectedValue) ? Guid.Empty : new Guid(DDL_Waerhouse.SelectedValue); //储位id byte storageType = string.IsNullOrEmpty(DDL_StorageAuth.SelectedValue) ? default(byte) : byte.Parse(DDL_StorageAuth.SelectedValue); //绑定物流配送公司 var list = new List <HostingFilialeAuth>(); var wlist = CurrentSession.Personnel.WarehouseList; if (wlist != null && wlist.Count > 0) { var warehouse = wlist.FirstOrDefault(act => act.WarehouseId == warehouseId); if (warehouse != null && warehouse.Storages != null) { var storageTypeAuth = warehouse.Storages.FirstOrDefault(p => p.StorageType == storageType); if (storageTypeAuth != null && storageTypeAuth.Filiales != null) { list.AddRange(storageTypeAuth.Filiales); } } } var saleAndHostingFilialeList = MISService.GetAllSaleAndHostingFilialeList(); DDL_HostingFilialeAuth.DataSource = saleAndHostingFilialeList; DDL_HostingFilialeAuth.DataTextField = "Name"; DDL_HostingFilialeAuth.DataValueField = "Id"; DDL_HostingFilialeAuth.DataBind(); DDL_HostingFilialeAuth.Items.Insert(0, new ListItem("全部", Guid.Empty.ToString())); DDL_HostingFilialeAuth.SelectedValue = Guid.Empty.ToString(); var filialeList = MISService.GetAllFiliales().ToList(); var dataFiliale = new List <FilialeInfo>(); foreach (var filialeId in list) { dataFiliale.AddRange(filialeList.Where(w => w.ParentId == filialeId.HostingFilialeId)); } DdlHostingFilialeAuthChanged(dataFiliale); RG_StorageRecord.Rebind(); }
/// <summary>采购单位Changed事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void DDLPurchase_OnSelectedIndexChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(DDL_Purchase.SelectedValue)) { OutPurchase(DDL_Purchase.SelectedValue == "1"); } else { DDL_PurchaseFiliale.Items.Clear(); DDL_PurchaseFiliale.DataSource = null; DDL_PurchaseFiliale.DataTextField = "CompanyName"; DDL_PurchaseFiliale.DataValueField = "CompanyId"; DDL_PurchaseFiliale.DataBind(); } RG_StorageRecord.Rebind(); }
protected void Lb_Reload_Click(object sender, EventArgs e) { RG_StorageRecord.Rebind(); }