public void fillUser()
        {
            BrilliantWMS.WMSInbound.iInboundClient   Inbound  = new WMSInbound.iInboundClient();
            BrilliantWMS.WMSOutbound.iOutboundClient Outbound = new WMSOutbound.iOutboundClient();
            iUCCommonFilterClient          objService         = new iUCCommonFilterClient();
            List <vGetUserProfileByUserID> UsersList          = new List <vGetUserProfileByUserID>();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                BrilliantWMS.WMSOutbound.tOrderHead OH = new WMSOutbound.tOrderHead();
                long WarehouseID = 0;
                if (Session["QCID"] != null)
                {
                    int chkJObCart = Inbound.CheckJobCard(Convert.ToInt64(HttpContext.Current.Session["QCID"].ToString()), "SalesOrder", profile.DBConnection._constr);
                    if (chkJObCart >= 1)
                    {
                        DataSet dsJCN = new DataSet();
                        dsJCN = Outbound.CheckSelectedSOJobCardNo(Convert.ToInt64(HttpContext.Current.Session["QCID"].ToString()), "SalesOrder", profile.DBConnection._constr);
                        if (dsJCN != null && dsJCN.Tables[0].Rows.Count > 0)
                        {
                            //lblSelectedPO.Text = dsJCN.Tables[0].Rows[0]["OrderNo"].ToString();
                            //lblSelectedGTN.Text = dsJCN.Tables[0].Rows[0]["JobCardName"].ToString();
                            //lblPurchaseOrderDate.Text = dsJCN.Tables[0].Rows[0]["CreationDate"].ToString();
                            //lblPOBy.Text = dsJCN.Tables[0].Rows[0]["CreatedByUser"].ToString();
                            WarehouseID = long.Parse(dsJCN.Tables[0].Rows[0]["Warehouse"].ToString());
                        }
                    }
                    else
                    {
                        OH = Outbound.GetSoDetailByQCID(Convert.ToInt64(HttpContext.Current.Session["QCID"].ToString()), profile.DBConnection._constr);
                        //lblSelectedPO.Text = Session["POID"].ToString();
                        //lblSelectedGTN.Text = "Not Created";
                        //lblPurchaseOrderDate.Text = POHead.POdate.Value.ToString("dd-MMM-yyyy");
                        //lblPOBy.Text = Inbound.GetUserNameByID(long.Parse(POHead.CreatedBy.ToString()), profile.DBConnection._constr);
                        WarehouseID = long.Parse(OH.StoreId.ToString());
                    }
                }
                else if (Session["TRID"] != null)
                {
                    int chkJObCart = Inbound.CheckJobCard(Convert.ToInt64(HttpContext.Current.Session["TRID"].ToString()), "Transfer", profile.DBConnection._constr);
                    if (chkJObCart >= 1)
                    {
                        DataSet dsJCN = new DataSet();
                        dsJCN = Outbound.CheckSelectedSOJobCardNo(Convert.ToInt64(HttpContext.Current.Session["TRID"].ToString()), "Transfer", profile.DBConnection._constr);
                        if (dsJCN != null && dsJCN.Tables[0].Rows.Count > 0)
                        {
                            WarehouseID = long.Parse(dsJCN.Tables[0].Rows[0]["Warehouse"].ToString());
                        }
                    }
                    else
                    {
                        BrilliantWMS.WMSInbound.tTransferHead TRHead = new WMSInbound.tTransferHead();
                        TRHead      = Inbound.GetTransferHeadByTRID(Convert.ToInt64(HttpContext.Current.Session["TRID"].ToString()), profile.DBConnection._constr);
                        WarehouseID = long.Parse(TRHead.FromPosition.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);

                ddlDispatchBy.DataSource = UsersList;
                ddlDispatchBy.DataBind();
            }
            catch { }
            finally { objService.Close(); }
        }