//[WebMethod]
        //public static void WMpageAddNew()
        //{
        ////iHQGoodsReceiptClient objService = new iHQGoodsReceiptClient();
        //try
        //{
        //    CustomProfile profile = CustomProfile.GetProfile();
        //    HttpContext.Current.Session["PORHQReceiptID"] = "0";
        //    HttpContext.Current.Session["PORstate"] = "Add";
        //  //  objService.ClearTempDataFromDB(HttpContext.Current.Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr);
        //    //objService.GetIssuePartDetailByRequestID(Convert.ToInt64(HttpContext.Current.Session["PORRequestID"].ToString()), HttpContext.Current.Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, "true", profile.DBConnection._constr).ToList();
        //}
        //catch { }
        //finally
        //{
        //    objService.Close();
        //}
        //}

        #endregion

        #region Fill Dropdown
        protected void FillSites()
        {
            iUCCommonFilterClient objService = new iUCCommonFilterClient();

            try
            {
                CustomProfile     profile  = CustomProfile.GetProfile();
                List <mTerritory> SiteList = new List <mTerritory>();
                // SiteList = objService.GetSiteNameByUserID(profile.Personal.UserID, profile.DBConnection._constr).ToList();

                SiteList = objService.GetSiteNameByUserID_IssueID(Convert.ToInt64(Session["PORIssueID"].ToString()), profile.Personal.UserID, profile.DBConnection._constr).ToList();

                ddlSites.DataSource = SiteList;
                ddlSites.DataBind();

                ListItem lst = new ListItem {
                    Text = "-Select-", Value = "0"
                };
                ddlSites.Items.Insert(0, lst);

                if (Session["PORstate"].ToString() == "Add")
                {
                    ddlSites.SelectedIndex   = 1;
                    ddlReceivedBy.DataSource = null;
                    ddlReceivedBy.DataBind();
                    ddlReceivedBy.DataSource = WMFillUserList(Convert.ToInt64(ddlSites.SelectedItem.Value));
                    ddlReceivedBy.DataBind();
                    ddlReceivedBy.SelectedIndex = ddlReceivedBy.Items.IndexOf(ddlReceivedBy.Items.FindByValue(profile.Personal.UserID.ToString()));
                    UC_PODate.Date = DateTime.Now;
                    // UC_ReceiptDate.Date = DateTime.Now;
                    // lblReceiptNo.Text = "Generate when save";
                    if (ddlStatus.Items.Count > 0)
                    {
                        ddlStatus.SelectedIndex = 1;
                    }
                }
            }
            catch { }
            finally { objService.Close(); }
        }