public void FillObjectList(string SelectedRecords, string ObjectName) { CustomProfile profile = CustomProfile.GetProfile(); BrilliantWMS.WMSInbound.iInboundClient Inbound = new WMSInbound.iInboundClient(); //iInboundClient Inbound = new iInboundClient(); iUCCommonFilterClient objService = new iUCCommonFilterClient(); List <vGetUserProfileByUserID> UsersList = new List <vGetUserProfileByUserID>(); try { DataSet ds = new DataSet(); ds = Inbound.GetNextObject(SelectedRecords, ObjectName, profile.Personal.CompanyID, profile.DBConnection._constr); ddlObjectName.DataSource = ds; ddlObjectName.DataBind(); long WarehouseID = 0; string[] onePo = SelectedRecords.Split(','); long POID = 0; if (ObjectName == "PurchaseOrder") { POID = long.Parse(onePo[0].ToString()); BrilliantWMS.WMSInbound.tPurchaseOrderHead POHead = new WMSInbound.tPurchaseOrderHead(); //tPurchaseOrderHead POHead = new tPurchaseOrderHead(); POHead = Inbound.GetPoHeadByPOID(POID, profile.DBConnection._constr); WarehouseID = long.Parse(POHead.Warehouse.ToString()); } else if (ObjectName == "GRN") { long GRNID = long.Parse(onePo[0].ToString()); BrilliantWMS.WMSInbound.WMS_VW_GetGRNDetails GrnLst = new WMSInbound.WMS_VW_GetGRNDetails(); //WMS_VW_GetGRNDetails GrnLst = new WMS_VW_GetGRNDetails(); GrnLst = Inbound.GetGRNDetailsByGRNIDGRNMenu(GRNID, profile.DBConnection._constr); POID = long.Parse(GrnLst.OID.ToString()); BrilliantWMS.WMSInbound.tPurchaseOrderHead POHead = new WMSInbound.tPurchaseOrderHead(); //tPurchaseOrderHead POHead = new tPurchaseOrderHead(); POHead = Inbound.GetPoHeadByPOID(POID, profile.DBConnection._constr); WarehouseID = long.Parse(POHead.Warehouse.ToString()); } else if (ObjectName == "QC") { long QCID = long.Parse(onePo[0].ToString()); BrilliantWMS.WMSInbound.WMS_VW_GetQCDetails QClist = new WMSInbound.WMS_VW_GetQCDetails(); //WMS_VW_GetQCDetails QClist = new WMS_VW_GetQCDetails(); QClist = Inbound.GetQCDetailsByQCID(QCID, profile.DBConnection._constr); WarehouseID = long.Parse(QClist.WarehouseID.ToString()); } else if (ObjectName == "SalesOrder") { long SOID = long.Parse(onePo[0].ToString()); BrilliantWMS.WMSOutbound.iOutboundClient Outbound = new WMSOutbound.iOutboundClient(); BrilliantWMS.WMSOutbound.tOrderHead soHead = new WMSOutbound.tOrderHead(); //tOrderHead soHead = new tOrderHead(); soHead = Outbound.GetSoHeadBySOID(SOID, profile.DBConnection._constr); WarehouseID = long.Parse(soHead.StoreId.ToString()); } UsersList = objService.GetUserListByWarehouseID(WarehouseID, profile.DBConnection._constr).ToList(); UsersList = UsersList.Where(x => x.userID == profile.Personal.UserID).ToList(); vGetUserProfileByUserID select = new vGetUserProfileByUserID() { userID = 0, userName = "******" }; UsersList.Insert(0, select); ddlAssignTo.DataSource = UsersList; ddlAssignTo.DataBind(); } catch { } finally { Inbound.Close(); } //if (Request.QueryString["invoker"] != null) CurrentObject = Request.QueryString["invoker"].ToString(); //UCAssignTaskService.iUCAssignTaskClient ucAssignTaskService = new UCAssignTaskService.iUCAssignTaskClient(); //ddlObjectName.DataSource = ucAssignTaskService.GetObjectToBind(CurrentObject, profile.DBConnection._constr); //ddlObjectName.DataBind(); //ucAssignTaskService.Close(); }