Пример #1
0
        public void FillUserList()
        {
            iUCCommonFilterClient          objService = new iUCCommonFilterClient();
            List <vGetUserProfileByUserID> UsersList  = new List <vGetUserProfileByUserID>();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                UsersList = objService.GetUserListBySiteID(Convert.ToInt64(hdnSiteID.Value), profile.DBConnection._constr).ToList();
                UsersList = UsersList.Distinct().ToList();
                vGetUserProfileByUserID select = new vGetUserProfileByUserID()
                {
                    userID = 0, userName = "******"
                };
                UsersList.Insert(0, select);

                ddlReceivedBy.DataSource = null;
                ddlReceivedBy.DataBind();
                ddlReceivedBy.DataSource = UsersList;
                ddlReceivedBy.DataBind();
                ddlReceivedBy.SelectedIndex = ddlReceivedBy.Items.IndexOf(ddlReceivedBy.Items.FindByValue(profile.Personal.UserID.ToString()));
            }
            catch { }
            finally { objService.Close(); }
        }
Пример #2
0
        public void fillSite()
        {
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            CustomProfile         profile        = CustomProfile.GetProfile();

            ddlFrmSite.DataSource = UCCommonFilter.GetSiteNameByUserID_Transfer(profile.Personal.UserID, profile.DBConnection._constr);
            ddlFrmSite.DataBind();
            ListItem lstfrm = new ListItem();

            lstfrm.Text  = "--Select--";
            lstfrm.Value = "0";
            ddlFrmSite.Items.Insert(0, lstfrm);

            iUCCommonFilterClient          objService = new iUCCommonFilterClient();
            List <vGetUserProfileByUserID> UsersList  = new List <vGetUserProfileByUserID>();

            UsersList = objService.GetUserListBySiteID(1, profile.DBConnection._constr).ToList();
            UsersList = UsersList.Distinct().ToList();
            vGetUserProfileByUserID select = new vGetUserProfileByUserID()
            {
                userID = 0, userName = "******"
            };

            UsersList.Insert(0, select);

            ddlTransferedBy.DataSource = null;
            ddlTransferedBy.DataBind();
            ddlTransferedBy.DataSource = UsersList;
            ddlTransferedBy.DataBind();
        }
Пример #3
0
        protected void BindAddressList(long DeptID)
        {
            List <VW_GetUserLocation> LocLst         = new List <VW_GetUserLocation>();
            List <tAddress>           AdrsLst        = new List <tAddress>();
            iUCCommonFilterClient     UCCommonFilter = new iUCCommonFilterClient();
            CustomProfile             profile        = CustomProfile.GetProfile();

            //string AdrsType = UCCommonFilter.GetAdrsType(DeptID, profile.DBConnection._constr);
            //if (AdrsType == "Location")
            //{
            //    tblAddAdrs.Attributes.Add("style", "display:none");
            //    gvContactPerson.Columns[0].Visible = false;
            LocLst = UCCommonFilter.GetLocationOfUser(profile.Personal.UserID, profile.DBConnection._constr).ToList();
            //AdrsLst = UCCommonFilter.GetUserLocation(profile.Personal.UserID, profile.DBConnection._constr).ToList();
            //}
            //else
            //{
            tblAddAdrs.Attributes.Add("style", "display:''");
            long CompanyID = UCCommonFilter.GetCompanyIDFromSiteID(DeptID, profile.DBConnection._constr);

            // AdrsLst = UCCommonFilter.GetDeptAddressList(CompanyID, profile.DBConnection._constr).ToList();
            // AdrsLst = UCCommonFilter.GetDeptAddressListAdrsType(CompanyID, DeptID, profile.DBConnection._constr).ToList();
            //}
            gvContactPerson.DataSource = LocLst;
            gvContactPerson.DataBind();
        }
Пример #4
0
        public static List <contact> GetDepartment(object objReq)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();
            DataSet        ds      = new DataSet();
            DataTable      dt      = new DataTable();
            List <contact> LocList = new List <contact>();

            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary = (Dictionary <string, object>)objReq;
                //ds = ReceivableClient.GetProdLocations(ProdCode.Trim());
                long ddlcompanyId = long.Parse(dictionary["ddlcompanyId"].ToString());

                /*Add By Suresh For Selected Department List Show */

                iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();

                //SiteLst = UCCommonFilter.GetAddedDepartmentList(int.Parse(ddlcompanyId.ToString()), profile.Personal.UserID, profile.DBConnection._constr).ToList();
                /* Add By Suresh For Selected Department List Show */

                if (profile.Personal.UserType == "Admin")
                {
                    ds = UCCommonFilter.GetAddedDepartmentListDS(int.Parse(ddlcompanyId.ToString()), profile.Personal.UserID, profile.DBConnection._constr);
                }
                else
                {
                    ds = productClient.GetDepartment(ddlcompanyId, profile.DBConnection._constr);
                }

                dt = ds.Tables[0];


                contact Loc = new contact();
                Loc.Name = "Select Department";
                Loc.Id   = "0";
                LocList.Add(Loc);
                Loc = new contact();

                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        Loc.Id   = dt.Rows[i]["ID"].ToString();
                        Loc.Name = dt.Rows[i]["Territory"].ToString();
                        LocList.Add(Loc);
                        Loc = new contact();
                    }
                }
            }
            catch
            {
            }
            finally
            {
                productClient.Close();
            }
            return(LocList);
        }
Пример #5
0
        public static string WMSaveRequestHead(object objAdr, string State)
        {
            string                result         = "";
            CustomProfile         profile        = CustomProfile.GetProfile();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            tAddress              Adrs           = new tAddress();
            tContactPersonDetail  Con            = new tContactPersonDetail();

            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary = (Dictionary <string, object>)objAdr;

                Adrs.AddressLine1     = dictionary["AddressLine1"].ToString();
                Adrs.ID               = Convert.ToInt64(HttpContext.Current.Session["ConID"].ToString());
                Adrs.LastModifiedBy   = profile.Personal.UserID.ToString();
                Adrs.LastModifiedDate = DateTime.Now;
                Adrs.City             = "";
                UCCommonFilter.EditAddress(Adrs, profile.DBConnection._constr);

                Con.Name     = dictionary["Name"].ToString();
                Con.EmailID  = dictionary["EmilID"].ToString();
                Con.MobileNo = dictionary["MobileNo"].ToString();
                long AdrsID = Convert.ToInt64(HttpContext.Current.Session["ConID"].ToString());
                UCCommonFilter.EditLocation(Con, AdrsID, profile.DBConnection._constr);

                result = "Location saved successfully";
            }
            catch { result = "Some error occurred"; }
            finally { UCCommonFilter.Close(); }

            return(result);
        }
Пример #6
0
        public void GetCompany()
        {
            DataSet               ds;
            CustomProfile         profile       = CustomProfile.GetProfile();
            iProductMasterClient  productClient = new iProductMasterClient();
            iUCCommonFilterClient objService    = new iUCCommonFilterClient();

            try
            {
                //ds = productClient.GetCompanyname(profile.DBConnection._constr);
                List <mCompany> CompanyLst = new List <mCompany>();
                long            UID        = profile.Personal.UserID;
                string          UserType   = profile.Personal.UserType.ToString();
                if (UserType == "Admin")
                {
                    CompanyLst = objService.GetUserCompanyNameNEW(UID, profile.DBConnection._constr).ToList();
                }
                else
                {
                    CompanyLst = objService.GetCompanyName(profile.DBConnection._constr).ToList();
                }
                //ddlcompany.DataSource = ds;
                ddlcompany.DataSource     = CompanyLst;
                ddlcompany.DataTextField  = "Name";
                ddlcompany.DataValueField = "ID";
                ddlcompany.DataBind();
                ListItem lst = new ListItem {
                    Text = "-Select-", Value = "0"
                };
                ddlcompany.Items.Insert(0, lst);
            }
            catch { }
            finally { productClient.Close(); }
        }
Пример #7
0
        protected void GetContactDetailByContactID()
        {
            CustomProfile         profile        = CustomProfile.GetProfile();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();

            try
            {
                tContactPersonDetail conper = new tContactPersonDetail();
                conper = UCCommonFilter.GetContactPersonDetailsByID(long.Parse(hdnConID.Value), profile.DBConnection._constr);

                if (conper.Name != null)
                {
                    txtName.Text = conper.Name.ToString();
                }
                if (conper.EmailID != null)
                {
                    txtEmail.Text = conper.EmailID.ToString();
                }
                if (conper.MobileNo != null)
                {
                    txtMobileNo.Text = conper.MobileNo.ToString();
                }
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "AddEditSearchContact", "GetContactDetailByContactID");
            }
            finally
            {
                UCCommonFilter.Close();
            }
        }
        public void GetLoaderDetail(long ldrID)
        {
            iInboundClient                 Inbound    = new iInboundClient();
            CustomProfile                  profile    = CustomProfile.GetProfile();
            iUCCommonFilterClient          objService = new iUCCommonFilterClient();
            List <vGetUserProfileByUserID> UsersList  = new List <vGetUserProfileByUserID>();

            try
            {
                tLoaderDetail LD = new tLoaderDetail();
                LD = Inbound.GetLoaderDetailOfGRN(ldrID, profile.DBConnection._constr);

                List <mVendor> VendorLst = new List <mVendor>();
                VendorLst = Inbound.GetVendor(profile.Personal.CompanyID, profile.DBConnection._constr).ToList();
                ddlLoaderName.DataSource = VendorLst;
                ddlLoaderName.DataBind();
                ddlLoaderName.SelectedIndex = ddlLoaderName.Items.IndexOf(ddlLoaderName.Items.FindByValue(LD.LoaderID.ToString()));

                txtInTime.Text     = LD.InTime.ToString();
                txtOutTime.Text    = LD.OutTime.ToString();
                txtBoxhandled.Text = LD.BoxHandels.ToString();
                txtRate.Text       = LD.RatePerBox.ToString();
                txtTotal.Text      = LD.Total.ToString();
            }
            catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, "Loader.aspx", "GetLoaderDetail"); }
            finally { Inbound.Close(); }
        }
Пример #9
0
        protected void GetContactDetailByContactID()
        {
            CustomProfile         profile        = CustomProfile.GetProfile();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();

            try
            {
                tAddress conper = new tAddress();
                conper = UCCommonFilter.GetAddressDetailsByID(long.Parse(hdnConID.Value), profile.DBConnection._constr);
                VW_GetUserLocation LocDetail = UCCommonFilter.GetLocationDetailsByID(long.Parse(hdnConID.Value), profile.DBConnection._constr);
                btnSave.Visible = true;
                if (sessionID == null)
                {
                    sessionID = Session.SessionID;
                }
                if (LocDetail.AddressLine1 != null)
                {
                    txtAddress.Text = LocDetail.AddressLine1.ToString();
                }
                if (LocDetail.LocationCode != null)
                {
                    txtLocationCode.Text = LocDetail.LocationCode.ToString();
                }
                txtLocationCode.Enabled = false;
                if (LocDetail.LocationName != null)
                {
                    txtLocationName.Text = LocDetail.LocationName.ToString();
                }
                txtLocationName.Enabled = false;
                if (LocDetail.Name != null)
                {
                    txtContactName.Text = LocDetail.Name.ToString();
                }
                if (LocDetail.MobileNo != null)
                {
                    txtContactNo.Text = LocDetail.MobileNo.ToString();
                }
                if (LocDetail.EmailID != null)
                {
                    txtEmailID.Text = LocDetail.EmailID.ToString();
                }


                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry1" + sessionID, "setCountry('India','Maharashtra','0','0');", true);
                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry1" + sessionID, "setCountry('" + conper.County + "','" + conper.State + "','0','0');", true);
                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry" + sessionID, "setCountry('" + conper.County + "','" + conper.State + "','" + conper.Zone + "','" + conper.SubZone + "');", true);
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "AddEditSearchAddress", "GetContactDetailByContactID");
            }
            finally
            {
                UCCommonFilter.Close();
            }
        }
        public static List <tContactPersonDetail> WMGetContactPerson2Lst(long Dept, long Cont1)
        {
            List <tContactPersonDetail> ConPerLst      = new List <tContactPersonDetail>();
            iUCCommonFilterClient       UCCommonFilter = new iUCCommonFilterClient();
            CustomProfile profile = CustomProfile.GetProfile();

            ConPerLst = UCCommonFilter.GetContactPerson2List(Dept, Cont1, profile.DBConnection._constr).ToList();

            return(ConPerLst);
        }
        public static string GetToSiteID(long IssueID)
        {
            string result;
            iUCCommonFilterClient SiteID  = new iUCCommonFilterClient();
            CustomProfile         profile = CustomProfile.GetProfile();
            long ID = SiteID.GetSiteID(IssueID, profile.DBConnection._constr);

            result = Convert.ToString(ID);
            return(result);
        }
        public static List <tAddress> WMGetDeptAddress(long Dept)
        {
            List <tAddress>       AdrsLst        = new List <tAddress>();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            CustomProfile         profile        = CustomProfile.GetProfile();

            AdrsLst = UCCommonFilter.GetDeptAddressList(Dept, profile.DBConnection._constr).ToList();

            return(AdrsLst);
        }
        public List <mTerritory> WMGetSelDept(int Cmpny, long UserID)
        {
            List <mTerritory>     SiteLst        = new List <mTerritory>();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            CustomProfile         profile        = CustomProfile.GetProfile();

            SiteLst = UCCommonFilter.GetAddedDepartmentList(Cmpny, UserID, profile.DBConnection._constr).ToList();

            return(SiteLst);
        }
Пример #14
0
        public static List <mTerritory> WMGetFromSite(long FrmSiteID)
        {
            List <mTerritory>     SiteLst        = new List <mTerritory>();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            CustomProfile         profile        = CustomProfile.GetProfile();

            SiteLst = UCCommonFilter.GetToSiteName_Transfer(FrmSiteID, profile.DBConnection._constr).ToList();

            return(SiteLst);
        }
Пример #15
0
        public void bindDropdown()
        {
            CustomProfile         profile        = CustomProfile.GetProfile();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            DataSet ds = new DataSet();

            ds = UCCommonFilter.GetStateList(profile.DBConnection._constr);
            ddlState.DataSource = ds;
            ddlState.DataBind();
        }
Пример #16
0
        protected void BindClientContactList(long ClntID)
        {
            CustomProfile profile = CustomProfile.GetProfile();
            List <tContactPersonDetail> ConPerLst      = new List <tContactPersonDetail>();
            iUCCommonFilterClient       UCCommonFilter = new iUCCommonFilterClient();

            ConPerLst = UCCommonFilter.GetContactPersonListClientWise(ClntID, profile.DBConnection._constr).ToList();

            gvContactPerson.DataSource = ConPerLst;
            gvContactPerson.DataBind();
        }
Пример #17
0
        protected void BindWAddress(long WarehouseID)
        {
            List <tAddress>       AdrsLst        = new List <tAddress>();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            CustomProfile         profile        = CustomProfile.GetProfile();

            tblAddAdrs.Attributes.Add("style", "display:none");
            AdrsLst = UCCommonFilter.GetWarehouseAddressList(WarehouseID, profile.DBConnection._constr).ToList();

            gvContactPerson.DataSource = AdrsLst;
            gvContactPerson.DataBind();
        }
Пример #18
0
        public static string WMSaveRequestHead(object objAdr, string State)
        {
            string                result         = "";
            CustomProfile         profile        = CustomProfile.GetProfile();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            tAddress              Adrs           = new tAddress();

            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary = (Dictionary <string, object>)objAdr;

                Adrs.AddressLine1 = dictionary["AddressLine1"].ToString();
                Adrs.City         = dictionary["City"].ToString();
                Adrs.County       = "Qatar";
                Adrs.State        = dictionary["State"].ToString();


                if (State == "Edit")
                {
                    Adrs.ID               = Convert.ToInt64(HttpContext.Current.Session["ConID"].ToString());
                    Adrs.LastModifiedBy   = profile.Personal.UserID.ToString();
                    Adrs.LastModifiedDate = DateTime.Now;

                    UCCommonFilter.EditAddress(Adrs, profile.DBConnection._constr);
                }
                else
                {
                    long DID       = Convert.ToInt64(HttpContext.Current.Session["DeptID"].ToString());
                    long CompanyID = UCCommonFilter.GetCompanyIDFromSiteID(DID, profile.DBConnection._constr);

                    Adrs.ObjectName   = "Account";
                    Adrs.ReferenceID  = DID;
                    Adrs.RouteID      = CompanyID;
                    Adrs.CompanyID    = CompanyID;
                    Adrs.Sequence     = 1;
                    Adrs.AddressType  = "none";
                    Adrs.IsDefault    = "N";
                    Adrs.Active       = "Y";//Set Active Y N
                    Adrs.CreatedBy    = profile.Personal.UserID.ToString();
                    Adrs.CreationDate = DateTime.Now;
                    UCCommonFilter.AddIntotAddress(Adrs, profile.DBConnection._constr);
                }
                result = "Address saved successfully";
            }
            catch { result = "Some error occurred"; }
            finally { UCCommonFilter.Close(); }

            return(result);
        }
Пример #19
0
        public void GetTransferDetails(string TransferID)
        {
            long TRID = long.Parse(TransferID);

            BrilliantWMS.WMSOutbound.iOutboundClient Outbound = new WMSOutbound.iOutboundClient();
            BrilliantWMS.WMSInbound.iInboundClient   Inbound  = new WMSInbound.iInboundClient();
            CustomProfile                  profile            = CustomProfile.GetProfile();
            iUCCommonFilterClient          objService         = new iUCCommonFilterClient();
            List <vGetUserProfileByUserID> UsersList          = new List <vGetUserProfileByUserID>();

            try
            {
                BrilliantWMS.WMSOutbound.tTransferHead trh = new WMSOutbound.tTransferHead();  //= new tTransferHead();
                trh = Outbound.GetTransferHeadDetailByTransferID(TRID, profile.DBConnection._constr);

                lblWTWTransferNo.Text  = trh.ID.ToString();
                UCWTWTransferDate.Date = trh.TransferDate;

                fillUser();
                ddlWTWTransferBy.SelectedIndex = ddlWTWTransferBy.Items.IndexOf(ddlWTWTransferBy.Items.FindByValue(trh.TransferBy.ToString()));

                ddlWTWStatus.DataSource = WMFillStatus();
                ddlWTWStatus.DataBind();
                ddlWTWStatus.SelectedIndex = ddlWTWStatus.Items.IndexOf(ddlWTWStatus.Items.FindByValue(trh.Status.ToString()));

                fillWarehouse();
                ddlFWarehouse.SelectedIndex = ddlFWarehouse.Items.IndexOf(ddlFWarehouse.Items.FindByValue(trh.FromPosition.ToString()));

                List <BrilliantWMS.WMSInbound.mWarehouseMaster> ToWarehouseList = new List <WMSInbound.mWarehouseMaster>();
                long UserID = profile.Personal.UserID;
                ToWarehouseList          = Inbound.GetUserWarehouse(UserID, profile.DBConnection._constr).ToList();
                ddlTWarehouse.DataSource = ToWarehouseList;
                ddlTWarehouse.DataBind();
                ddlTWarehouse.SelectedIndex = ddlTWarehouse.Items.IndexOf(ddlTWarehouse.Items.FindByValue(trh.ToPosition.ToString()));

                WTWTRemark.Text         = trh.Remark.ToString();
                txtAirwayBill.Text      = trh.AirwayBill.ToString();
                txtShippingType.Text    = trh.ShippingType.ToString();
                UC_ShippingDate.Date    = trh.ShippingDate;
                UCExpDeliveryDate.Date  = trh.ExpDeliveryDate;
                txtTransporterName.Text = trh.TransporterName.ToString();

                Grid1.DataSource = Outbound.GetTransferPartDetailByTransferID(TRID, long.Parse(trh.FromPosition.ToString()), Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr);
                Grid1.DataBind();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "changemodeRequest" + Session.SessionID, "changemode(true, 'divWTWTransferDetail');LoadingOff();", true);
            }
            catch { }
            finally { Outbound.Close(); objService.Close(); UsersList.Clear(); }
        }
        public static string WMSaveRequestHead(object objCon, string State)
        {
            string                result         = "";
            CustomProfile         profile        = CustomProfile.GetProfile();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            tContactPersonDetail  ConPerD        = new tContactPersonDetail();

            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary = (Dictionary <string, object>)objCon;

                ConPerD.Name     = dictionary["Name"].ToString();
                ConPerD.MobileNo = dictionary["MobileNo"].ToString();
                ConPerD.EmailID  = dictionary["EmailID"].ToString();
                long CompanyID = long.Parse(dictionary["CompanyId"].ToString());

                if (State == "Edit")
                {
                    ConPerD.ID               = Convert.ToInt64(HttpContext.Current.Session["ConID"].ToString());
                    ConPerD.LastModifiedBy   = profile.Personal.UserID.ToString();
                    ConPerD.LastModifiedDate = DateTime.Now;
                    UCCommonFilter.EditContactPerson(ConPerD, profile.DBConnection._constr);
                }
                else
                {
                    //long DID = Convert.ToInt64(HttpContext.Current.Session["DeptID"].ToString());
                    // long CompanyID = UCCommonFilter.GetCompanyIDFromSiteID(DID, profile.DBConnection._constr);
                    long DID = 0;
                    ConPerD.ReferenceID    = CompanyID;
                    ConPerD.Department     = DID;
                    ConPerD.CompanyID      = CompanyID;
                    ConPerD.Sequence       = 1;
                    ConPerD.ObjectName     = "Contact";
                    ConPerD.CustomerHeadID = 0;
                    ConPerD.ContactTypeID  = 4;
                    ConPerD.Active         = "N";
                    ConPerD.CreatedBy      = profile.Personal.UserID.ToString();
                    ConPerD.CreationDate   = DateTime.Now;
                    UCCommonFilter.AddIntotContactpersonDetail(ConPerD, profile.DBConnection._constr);
                }
                result = "Contact saved successfully";
            }
            catch { result = "Some error occurred"; }
            finally { UCCommonFilter.Close(); }

            return(result);
        }
        public static List <mTerritory> WMGetDept(int Cmpny)
        {
            List <mTerritory>     SiteLst        = new List <mTerritory>();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            CustomProfile         profile        = CustomProfile.GetProfile();

            if (profile.Personal.UserType == "Admin")
            {
                SiteLst = UCCommonFilter.GetAddedDepartmentList(Cmpny, profile.Personal.UserID, profile.DBConnection._constr).ToList();
            }
            else
            {
                SiteLst = UCCommonFilter.GetDepartmentList(Cmpny, profile.DBConnection._constr).ToList();
            }
            return(SiteLst);
        }
        public void GetASNDetail(long asnID)
        {
            iInboundClient                 Inbound    = new iInboundClient();
            CustomProfile                  profile    = CustomProfile.GetProfile();
            iUCCommonFilterClient          objService = new iUCCommonFilterClient();
            List <vGetUserProfileByUserID> UsersList  = new List <vGetUserProfileByUserID>();

            try
            {
                tASNHead ah = new tASNHead();
                ah = Inbound.GetAsnByAsnID(asnID, profile.DBConnection._constr);

                txtASNNumber.Text = ah.ASNNumber.ToString();
                UCASNDate.Date    = ah.ASNDate;

                UsersList = objService.GetUserListByWarehouseID(10013, 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);
                ddlASNBy.DataSource = UsersList;
                ddlASNBy.DataBind();
                ddlASNBy.SelectedIndex = ddlASNBy.Items.IndexOf(ddlASNBy.Items.FindByValue(ah.ASNEnteredBy.ToString()));

                List <mWarehouseMaster> WarehouseList = new List <mWarehouseMaster>();
                long UserID = profile.Personal.UserID;
                WarehouseList           = Inbound.GetUserWarehouse(UserID, profile.DBConnection._constr).ToList();
                ddlWarehouse.DataSource = WarehouseList;
                ddlWarehouse.DataBind();
                // ddlWarehouse.SelectedIndex = ddlWarehouse.Items.IndexOf(ddlWarehouse.Items.FindByValue(ah.WarehouseNo.ToString()));

                List <mVendor> VendorLst = new List <mVendor>();
                VendorLst            = Inbound.GetVendor(profile.Personal.CompanyID, profile.DBConnection._constr).ToList();
                ddlVendor.DataSource = VendorLst;
                ddlVendor.DataBind();
                //    ddlVendor.SelectedIndex = ddlVendor.Items.IndexOf(ddlVendor.Items.FindByValue(ah.VendorId.ToString()));

                txtRemark.Text = ah.Remark.ToString();

                Grid1.DataSource = Inbound.GetASNDetailByID(asnID, profile.DBConnection._constr);
                Grid1.DataBind();
            }
            catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, "AsnDetail.aspx", "GetASNDetail"); }
            finally { Inbound.Close(); }
        }
Пример #23
0
        public void Bindropdown()
        {
            CustomProfile        profile       = CustomProfile.GetProfile();
            iProductMasterClient productClient = new iProductMasterClient();

            //ddlProductType.DataSource = productClient.GetProductTypeList(profile.DBConnection._constr);
            //ddlProductType.DataBind();

            //ListItem lst1 = new ListItem();
            //lst1.Text = "-Select-";
            //lst1.Value = "0";
            //ddlProductType.Items.Insert(0, lst1);

            ddlUOM.SelectedIndex = -1;
            ddlUOM.DataSource    = productClient.GetProductUOMList(profile.DBConnection._constr);
            ddlUOM.DataBind();
            ListItem lst3 = new ListItem();

            lst3.Text  = "-Select-";
            lst3.Value = "0";
            ddlUOM.Items.Insert(0, lst3);
            productClient.Close();

            BrilliantWMS.ProductCategoryService.iProductCategoryMasterClient productcategoryClient = new BrilliantWMS.ProductCategoryService.iProductCategoryMasterClient();
            //ProductCategoryService.connectiondetails conn = new ProductCategoryService.connectiondetails() { DataBaseName = Profile.DataBase, DataSource = Profile.DataSource, DBPassword = Profile.DBPassword };

            ddlCategory.SelectedIndex = -1;
            ddlCategory.DataSource    = productcategoryClient.GetProductCategoryListForAsset(profile.DBConnection._constr);
            ddlCategory.DataBind();
            productcategoryClient.Close();
            ListItem lst2 = new ListItem();

            lst2.Text  = "-Select-";
            lst2.Value = "0";
            ddlCategory.Items.Insert(0, lst2);


            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();

            ddlNewSite.DataSource = UCCommonFilter.GetSiteNameByUserID(profile.Personal.UserID, profile.DBConnection._constr);
            ddlNewSite.DataBind();
            ListItem lst = new ListItem();

            lst.Text  = "--Select--";
            lst.Value = "0";
            ddlNewSite.Items.Insert(0, lst);
        }
        public static List <PORServiceUCCommonFilter.v_GetEngineDetails> WMFillEnginList(long SiteID)
        {
            iUCCommonFilterClient objService = new iUCCommonFilterClient();
            List <PORServiceUCCommonFilter.v_GetEngineDetails> EngineList = new List <PORServiceUCCommonFilter.v_GetEngineDetails>();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                EngineList = objService.GetEngineOfSite(SiteID.ToString(), profile.DBConnection._constr).ToList();
                PORServiceUCCommonFilter.v_GetEngineDetails select = new PORServiceUCCommonFilter.v_GetEngineDetails()
                {
                    ID = 0, Container = "-Select-"
                };
                EngineList.Insert(0, select);
            }
            catch { }
            finally { objService.Close(); }
            return(EngineList);
        }
        public static List <vGetUserProfileByUserID> WMFillUserList(long SiteID)
        {
            iUCCommonFilterClient          objService = new iUCCommonFilterClient();
            List <vGetUserProfileByUserID> UsersList  = new List <vGetUserProfileByUserID>();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                UsersList = objService.GetUserListBySiteID(SiteID, profile.DBConnection._constr).ToList();
                UsersList = UsersList.Distinct().ToList();
                vGetUserProfileByUserID select = new vGetUserProfileByUserID()
                {
                    userID = 0, userName = "******"
                };
                UsersList.Insert(0, select);
            }
            catch { }
            finally { objService.Close(); }
            return(UsersList);
        }
        //[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(); }
        }
Пример #27
0
        public void fillUser()
        {
            BrilliantWMS.WMSInbound.iInboundClient Inbound = new WMSInbound.iInboundClient();
            iUCCommonFilterClient          objService      = new iUCCommonFilterClient();
            List <vGetUserProfileByUserID> UsersList       = new List <vGetUserProfileByUserID>();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                List <SP_GWC_GetUserInfo_Result> Usrlst = new List <SP_GWC_GetUserInfo_Result>();
                Usrlst = objService.GetUsrLst1("", "", profile.DBConnection._constr).ToList();
                Usrlst = Usrlst.Where(u => u.ID == profile.Personal.UserID).ToList();
                ddlWTWTransferBy.DataSource = Usrlst;
                ddlWTWTransferBy.DataBind();
                ListItem lstUsr = new ListItem {
                    Text = "-Select-", Value = "0"
                };
                ddlWTWTransferBy.Items.Insert(0, lstUsr);
            }
            catch { }
            finally { objService.Close(); }
        }
        protected void FillSites()
        {
            iUCCommonFilterClient objService = new iUCCommonFilterClient();
            List <mTerritory>     SiteList   = new List <mTerritory>();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();

                SiteList = objService.GetSiteNameByUserID(profile.Personal.UserID, profile.DBConnection._constr).ToList();
                mTerritory select = new mTerritory()
                {
                    ID = 0, Territory = "-Select-"
                };
                SiteList.Insert(0, select);
                ddlSites.DataSource = SiteList;
                ddlSites.DataBind();

                ddlSites.SelectedIndex = 1;
            }
            catch { }
            finally { objService.Close(); }
        }
Пример #29
0
        protected void GetContactDetailByContactID()
        {
            CustomProfile         profile        = CustomProfile.GetProfile();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();

            try
            {
                tAddress conper = new tAddress();
                conper = UCCommonFilter.GetAddressDetailsByID(long.Parse(hdnConID.Value), profile.DBConnection._constr);
                if (sessionID == null)
                {
                    sessionID = Session.SessionID;
                }
                if (conper.AddressLine1 != null)
                {
                    txtAddress.Text = conper.AddressLine1.ToString();
                }
                if (conper.City != null)
                {
                    txtcity.Text = conper.City.ToString();
                }
                bindDropdown();
                ddlState.SelectedIndex = ddlState.Items.IndexOf(ddlState.Items.FindByValue(conper.State.ToString()));

                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry1" + sessionID, "setCountry('India','Maharashtra','0','0');", true);
                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry1" + sessionID, "setCountry('" + conper.County + "','" + conper.State + "','0','0');", true);
                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry" + sessionID, "setCountry('" + conper.County + "','" + conper.State + "','" + conper.Zone + "','" + conper.SubZone + "');", true);
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "AddEditSearchAddress", "GetContactDetailByContactID");
            }
            finally
            {
                UCCommonFilter.Close();
            }
        }
        public void FillUserList(long SiteID)
        {
            iUCCommonFilterClient          objService = new iUCCommonFilterClient();
            List <vGetUserProfileByUserID> UsersList  = new List <vGetUserProfileByUserID>();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                UsersList = objService.GetUserListBySiteID(SiteID, profile.DBConnection._constr).ToList();
                UsersList = UsersList.Distinct().ToList();
                vGetUserProfileByUserID select = new vGetUserProfileByUserID()
                {
                    userID = 0, userName = "******"
                };
                UsersList.Insert(0, select);

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