Ejemplo n.º 1
0
        protected void FillInventoryGrid()
        {
            iProductMasterClient objService = new iProductMasterClient();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                List <SP_GetSiteWiseInventoryByProductIDs_Result> InventoryList = new List <SP_GetSiteWiseInventoryByProductIDs_Result>();
                InventoryList          = objService.GetInventoryDataByProductIDs(hdnprodID.Value, Session.SessionID, profile.Personal.UserID.ToString(), CurrentObject, profile.DBConnection._constr).ToList();
                GVInventory.DataSource = null;
                GVInventory.DataBind();
                GVInventory.DataSource = InventoryList;
                GVInventory.DataBind();

                if (InventoryList.Count > 0)
                {
                    if (InventoryList[0].EffectiveDate != null)
                    {
                        // UC_EffectiveDateInventory.Date = InventoryList[0].EffectiveDate;
                    }
                }
            }
            catch { }
            finally { objService.Close(); }
        }
Ejemplo n.º 2
0
        protected void btnnext_Click(object sender, EventArgs e)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();

            try
            {
                ds = productClient.GetPriceImportData(DeptID, profile.DBConnection._constr);
                dt = ds.Tables[0];
                for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
                {
                    string  SkuCode = ds.Tables[0].Rows[i]["SKUCode"].ToString();
                    decimal Price   = decimal.Parse(ds.Tables[0].Rows[i]["Price"].ToString());
                    productClient.UpdateImportSkuPrice(SkuCode, Price, DeptID, profile.DBConnection._constr);
                }
                productClient.DeleteSKUPricetemp(profile.DBConnection._constr);
                Response.Redirect("ImportPriceF.aspx");
            }
            catch
            {
                productClient.DeleteSKUPricetemp(profile.DBConnection._constr);
            }
            finally
            {
                productClient.Close();
            }
        }
Ejemplo n.º 3
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(); }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
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.GetProductCategoryList(profile.DBConnection._constr);
            //ddlCategory.DataBind();
            productcategoryClient.Close();
            ListItem lst2 = new ListItem();

            lst2.Text  = "-Select-";
            lst2.Value = "0";
            // ddlCategory.Items.Insert(0, lst2);
        }
Ejemplo n.º 6
0
        protected void GVAssetList_OnRebind(object sender, EventArgs e)
        {
            iProductMasterClient productClient = new iProductMasterClient();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                GVAssetList.DataSource = null;
                GVAssetList.DataBind();
                var FrmSite = hdnSelectedFromSite.Value;
                if (FrmSite != "" && FrmSite != "0")
                {
                    if (hdnRemovePrd.Value == "0")
                    {
                        //GVAssetList.DataSource = productClient.GetSitewiseTool(Convert.ToInt64(FrmSite), profile.DBConnection._constr);
                        GVAssetList.DataSource = productClient.GetSitewiseTool(Convert.ToInt64(FrmSite), Session.SessionID, profile.Personal.UserID.ToString(), "AssetList", profile.DBConnection._constr);
                        GVAssetList.DataBind();
                    }
                    else
                    {
                        List <POR_SP_SiteWiseTools_Result> AssetLst = new List <POR_SP_SiteWiseTools_Result>();
                        AssetLst = productClient.GetExistingTempDataBySessionIDObjectNamePrd(Session.SessionID, profile.Personal.UserID.ToString(), "AssetList", profile.DBConnection._constr).ToList();

                        GVAssetList.DataSource = AssetLst;
                        GVAssetList.DataBind();
                    }
                }
            }
            catch (Exception ex) { Login.Profile.ErrorHandling(ex, "ToolTransfer", "GVAssetList"); }
            finally { productClient.Close(); }
        }
        public static void SaveVirtualQty(object objReq)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile = CustomProfile.GetProfile();
            DataTable            dt = new DataTable();
            decimal availbalance = 0m, virtualQty = 0m, AvailVirtyalQty = 0m;
            long    storeID = 0;

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

                long    Quantity = long.Parse(dictionary["quantity"].ToString());
                long    hdnskuid = long.Parse(dictionary["hdnskuid"].ToString());
                DataSet ds       = productClient.GetAvailQuantity(hdnskuid, profile.DBConnection._constr);
                dt = ds.Tables[0];
                if (dt.Rows.Count > 0)
                {
                    storeID         = long.Parse(dt.Rows[0]["SiteID"].ToString());
                    availbalance    = decimal.Parse(dt.Rows[0]["AvailableBalance"].ToString());
                    virtualQty      = decimal.Parse(dt.Rows[0]["VirtualQty"].ToString());
                    AvailVirtyalQty = decimal.Parse(dt.Rows[0]["AvailVirtualQty"].ToString());
                }
                if (virtualQty == 0)
                {
                    AvailVirtyalQty = availbalance + Quantity;
                    virtualQty      = Quantity;
                }
                else
                {
                    AvailVirtyalQty = availbalance + virtualQty + Quantity;
                    virtualQty      = virtualQty + Quantity;
                }
                productClient.UpdateVirtualBalance(hdnskuid, virtualQty, AvailVirtyalQty, profile.DBConnection._constr);
                productClient.InsertIntoInventry(hdnskuid, storeID, DateTime.Now, Quantity, profile.DBConnection._constr);
            }
            catch (System.Exception ex)
            {
                productClient.Close();
            }
            finally
            {
                productClient.Close();
            }
        }
Ejemplo n.º 8
0
        protected void Btncancel_Click(object sender, EventArgs e)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();

            productClient.DeleteSKUPricetemp(profile.DBConnection._constr);
            productClient.Close();
        }
Ejemplo n.º 9
0
        protected void GetProductList() /*Bind GridView*/
        {
            CustomProfile        profile       = CustomProfile.GetProfile();
            iProductMasterClient productClient = new iProductMasterClient();

            //grvProduct.DataSource = productClient.GetProductList(profile.DBConnection._constr);
            //grvProduct.DataBind();
            productClient.Close();
        }
Ejemplo n.º 10
0
        public static void TempSaveTaxSetup(string IsChecked, string TaxID)
        {
            CustomProfile        profile       = CustomProfile.GetProfile();
            iProductMasterClient productClient = new iProductMasterClient();

            //connectiondetails conn = new connectiondetails() { DataBaseName = Profile.DataBase, DataSource = Profile.DataSource, DBPassword = Profile.DBPassword };
            productClient.UpdateTempTaxSetup(TaxID, IsChecked.ToLower(), sessionID, profile.Personal.UserID.ToString(), profile.DBConnection._constr);
            productClient.Close();
        }
        protected void btnback_Click(object sender, EventArgs e)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();

            productClient.DeleteOrderImport(profile.DBConnection._constr);
            productClient.Close();
            Response.Redirect("DirectImportD.aspx");
        }
        public static void PMSaveLocation(object LocationInfo)
        {
            iProductMasterClient productClient = new iProductMasterClient();

            try
            {
                CustomProfile profile           = CustomProfile.GetProfile();
                Dictionary <string, object> rec = new Dictionary <string, object>();
                rec = (Dictionary <string, object>)LocationInfo;

                mProductLocation    Location  = new mProductLocation();
                tProductStockDetail ProdStock = new tProductStockDetail();

                long ProdLocID = Convert.ToInt64(rec["ProdLocID"].ToString());
                Location.ProdId            = Convert.ToInt64(rec["SKUID"].ToString());
                Location.LocationId        = Convert.ToInt64(rec["LocationID"].ToString());
                Location.LocType           = rec["LocationType"].ToString();
                Location.MinOrderQty       = decimal.Parse(rec["MinQty"].ToString());
                Location.MaxOrderQty       = decimal.Parse(rec["MaxQty"].ToString());
                ProdStock.SiteID           = Convert.ToInt64(rec["LocationID"].ToString());
                ProdStock.ProdID           = Convert.ToInt64(rec["SKUID"].ToString());
                ProdStock.OpeningStock     = decimal.Parse(rec["OpeningBalance"].ToString());
                ProdStock.AvailableBalance = decimal.Parse(rec["OpeningBalance"].ToString());
                if (ProdLocID != 0)
                {
                    Location.Id = Convert.ToInt64(rec["ProdLocID"].ToString());
                    int result = productClient.UpdateProdLocation(Location, profile.DBConnection._constr);
                }
                else
                {
                    productClient.InsertProductLocation(Location, profile.DBConnection._constr);
                    long Res = productClient.InsertOpBlInProductStock(ProdStock, profile.DBConnection._constr);
                }
                productClient.Close();
            }
            catch (System.Exception ex)
            {
                productClient.Close();
                Login.Profile.ErrorHandling(ex, thispage, "LocationInfo", "PMSaveLocation");
            }
        }
        protected void btnSubmit_OnClick(object sender, EventArgs e)
        {
            try
            {
                string        state;
                CustomProfile profile = CustomProfile.GetProfile();
                //if (checkduplicate() == "")
                //{
                iProductMasterClient productClient = new iProductMasterClient();
                mProduct             obj           = new mProduct();

                state = "Edit";
                obj   = productClient.GetmProductToUpdate(Convert.ToInt64(hdnprodID.Value), profile.DBConnection._constr);
                obj.LastModifiedBy   = profile.Personal.UserID.ToString();
                obj.LastModifiedDate = DateTime.Now;

                obj.ProductTypeID     = Convert.ToInt64(ddlProductType.SelectedItem.Value);
                obj.ProductCategoryID = Convert.ToInt64(ddlCategory.SelectedItem.Value);
                if (ddlSubCategory.SelectedIndex > 0)
                {
                    obj.ProductSubCategoryID = Convert.ToInt64(ddlSubCategory.SelectedItem.Value);
                }
                obj.ProductCode = txtProductCode.Text.ToString().Trim();
                obj.Name        = txtProductName.Text.ToString().Trim();
                obj.UOMID       = Convert.ToInt64(ddlUOM.SelectedItem.Value);
                if (txtPrincipalPrice.Text == "")
                {
                    txtPrincipalPrice.Text = "0";
                }
                obj.PrincipalPrice = Convert.ToDecimal(txtPrincipalPrice.Text);
                obj.Description    = txtPrdDesc.Text.ToString().Trim();

                obj.Installable = Convert.ToBoolean(0);

                hdnprodID.Value = productClient.FinalSaveProductDetailByProductID(obj, profile.DBConnection._constr).ToString();

                productClient.Close();

                GetIssueHead();

                this.ModelPopUp.Hide();
                //}
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "PartIssueEntry", "ProductSave");
            }
            finally
            {
            }
        }
Ejemplo n.º 14
0
        public static void PMSaveAddress(object objReq)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();

            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary = (Dictionary <string, object>)objReq;
                long   SpecificID = long.Parse(dictionary["hdnspecifid"].ToString());
                string udf        = dictionary["udf"].ToString();
                string value      = dictionary["value"].ToString();
                productClient.Updatespecification(SpecificID, value, profile.DBConnection._constr);
            }
            catch (System.Exception ex)
            {
                productClient.Close();
            }
            finally
            {
                productClient.Close();
            }
        }
Ejemplo n.º 15
0
        protected void GetProductImagesByProductID()
        {
            CustomProfile profile = CustomProfile.GetProfile();

            if (hdnprodID.Value == "")
            {
                hdnprodID.Value = "0";
            }
            iProductMasterClient productClient = new iProductMasterClient();

            GVImages.DataSource = productClient.GetProductImagesByProductID(Convert.ToInt64(hdnprodID.Value), Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr);
            GVImages.DataBind();
            productClient.Close();
        }
Ejemplo n.º 16
0
        protected void ResetUserControl()
        {
            iProductMasterClient objService = new iProductMasterClient();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                UC_AttachDocument1.ClearDocument("Product");
                objService.ClearTempDataFromDB(Session.SessionID, profile.Personal.UserID.ToString(), CurrentObject, profile.DBConnection._constr);
                hdnprodID.Value = "0";
            }
            catch { }
            finally { objService.Close(); }
        }
        public static void PMSaveAddress(object objReq)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();

            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary = (Dictionary <string, object>)objReq;
                long   UOMId        = long.Parse(dictionary["UOMDescri"].ToString());
                long   Quantity     = long.Parse(dictionary["quantity"].ToString());
                long   sequence     = long.Parse(dictionary["sequence"].ToString());
                string Description  = dictionary["Description"].ToString();
                string hdnstate     = dictionary["hdnstate"].ToString();
                long   hdnpackuomid = long.Parse(dictionary["hdnpackuomid"].ToString());
                long   SKuId        = long.Parse(dictionary["hdnskuid"].ToString());
                string UomShort     = productClient.GetUomShort(UOMId, profile.DBConnection._constr);

                if (hdnstate != "Edit")
                {
                    productClient.InsertIntomPackUom(SKuId, UomShort, Description, Quantity, sequence, profile.DBConnection._constr);
                }
                else
                {
                    productClient.UpdatemPackUom(hdnpackuomid, UomShort, Description, Quantity, sequence, profile.DBConnection._constr);
                }
            }
            catch (System.Exception ex)
            {
                productClient.Close();
            }
            finally
            {
                productClient.Close();
            }
        }
Ejemplo n.º 18
0
 protected void BtnSubMitproductSp_Click(object sender, EventArgs e)
 {
     try
     {
         //iProductMasterClient productClient = new iProductMasterClient();
         iProductMasterClient productClient = new iProductMasterClient();
         List <mProductSpecificationDetail> ProductSpecificationDetail = new List <mProductSpecificationDetail>();
         CustomProfile profile = CustomProfile.GetProfile();
         mProductSpecificationDetail oprodspec = new mProductSpecificationDetail();
         if (Hndstate.Value == "Edit")
         {
             oprodspec          = productClient.GetSpecificationDetailFromTempTableBySequence(Session.SessionID, profile.Personal.UserID.ToString(), 0, Convert.ToInt16(hndsequence.Value), profile.DBConnection._constr);
             oprodspec.Sequence = Convert.ToInt64(hndsequence.Value);
         }
         else
         {
             oprodspec.Sequence = 0;
         }
         oprodspec.SpecificationTitle       = txtspecificationtitle.Text;;
         oprodspec.SpecificationDescription = txtSpecificationDesc.Text;
         oprodspec.Active       = "Y";
         oprodspec.ProductID    = Convert.ToInt32(hdnprodID.Value);
         oprodspec.CreatedBy    = profile.Personal.UserID.ToString(); //need to change
         oprodspec.CreationDate = DateTime.Now;
         oprodspec.CompanyID    = profile.Personal.CompanyID;         // need to change
         //int upprodsperesult = productClient.InserttProductSpecificationDetail(oprodspec, profile.DBConnection._constr);
         if (Hndstate.Value == "Edit")
         {
             ProductSpecificationDetail = productClient.SetValuesToTempData_onChange(0, Session.SessionID, profile.Personal.UserID.ToString(), profile.DBConnection._constr, Convert.ToInt16(hndsequence.Value), oprodspec).ToList();
         }
         else
         {
             ProductSpecificationDetail = productClient.AddProductSpecificationToTempData(oprodspec, Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr).ToList();
         }
         GVProductSpecification.DataSource = ProductSpecificationDetail;
         GVProductSpecification.DataBind();
         productClient.Close();
         Hndstate.Value = "";
         clr();
     }
     catch (System.Exception ex)
     {
         Login.Profile.ErrorHandling(ex, this, "Productmaster", "BtnSubmit_Click");
     }
     finally
     {
     }
 }
        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());

                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 (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, "Role Master", "GetDepartment");
            }
            finally
            {
                productClient.Close();
            }
            return(LocList);
        }
Ejemplo n.º 20
0
        protected void clear()
        {
            CustomProfile profile = CustomProfile.GetProfile();

            // ddlProductType.SelectedIndex = -1;
            //ddlCategory.SelectedIndex = -1;
            // ddlSubCategory.SelectedIndex = -1;
            txtProductCode.Text = "";
            txtProductName.Text = "";
            // ddlUOM.SelectedIndex = -1;
            //txtPrincipalPrice.Text = "";
            //txtFixedDisc.Text = "";
            //chkboxFixedDiscIsPercent.Checked = false;
            //chkProductSpe.Items[0].Selected = false;
            //chkProductSpe.Items[1].Selected = false;
            //txtWarrenyInDays.Text = "0";
            //txtGuaranteeInDays.Text = "0";
            //txtOpeningBalance.Text = "";
            //txtCurrentBalance.Text = "";
            //txtReorderLevel.Text = "";
            //txtMaxBalanceQuantity.Text = "";
            //txtMinOrderQuantity.Text = "";
            //txtLeadTimeInDays.Text = "";
            hdnprodID.Value = null;

            GVImages.DataSource = null;
            GVImages.DataBind();

            GVProductSpecification.DataSource = null;
            GVProductSpecification.DataBind();

            GVTaxSetup.DataSource = null;
            GVTaxSetup.DataBind();

            iProductMasterClient productClient = new iProductMasterClient();

            productClient.ClearTempSaveProductSpecificationDetailBySessionID(Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr);

            productClient.ClearTempSaveProductTaxDetailBySessionID(Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr);

            productClient.ClearTempSaveProductImagesBySessionID(Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr);

            productClient.Close();
            ResetUserControl();
        }
Ejemplo n.º 21
0
        protected void GVProductSpecification_InsertRecord(object sender, Obout.Grid.GridRecordEventArgs e)
        {
            CustomProfile profile = CustomProfile.GetProfile();
            mProductSpecificationDetail oprodspec = new mProductSpecificationDetail();

            oprodspec.SpecificationTitle       = e.Record["SpecificationTitle"].ToString();
            oprodspec.SpecificationDescription = e.Record["SpecificationDescription"].ToString();
            oprodspec.Active       = "Y";
            oprodspec.ProductID    = Convert.ToInt32(hdnprodID.Value);
            oprodspec.CreatedBy    = profile.Personal.UserID.ToString(); //need to change
            oprodspec.CreationDate = DateTime.Now;
            oprodspec.CompanyID    = profile.Personal.CompanyID;         // need to change
            //int upprodsperesult = productClient.InserttProductSpecificationDetail(oprodspec, profile.DBConnection._constr);
            iProductMasterClient productClient = new iProductMasterClient();

            productClient.AddProductSpecificationToTempData(oprodspec, Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr);
            productClient.Close();
        }
Ejemplo n.º 22
0
 protected void GVTaxSetup_OnRebind(object sender, EventArgs e)
 {
     try
     {
         CustomProfile        profile       = CustomProfile.GetProfile();
         iProductMasterClient productClient = new iProductMasterClient();
         GVTaxSetup.DataSource = productClient.GetTempSaveProductTaxDetailBySessionID(Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr);
         GVTaxSetup.DataBind();
         productClient.Close();
     }
     catch (System.Exception ex)
     {
         Login.Profile.ErrorHandling(ex, this, "ProductMaster", "GVTaxSetup_OnRebind");
     }
     finally
     {
     }
 }
Ejemplo n.º 23
0
        public static void WMRemovePartFromList(Int32 Sequence)
        {
            iProductMasterClient productClient = new iProductMasterClient();

            //iPartRequestClient objService = new iPartRequestClient();
            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                CustomProfile profile = CustomProfile.GetProfile();
                //  objService.RemovePartFromRequest_TempData(HttpContext.Current.Session.SessionID, profile.Personal.UserID.ToString(), Sequence, profile.DBConnection._constr);
                productClient.RemoveAssetFromCurrentAsset_TempData(HttpContext.Current.Session.SessionID, profile.Personal.UserID.ToString(), "AssetList", Sequence, profile.DBConnection._constr);
            }
            catch { }
            finally
            {
                productClient.Close();
            }
        }
        public static List <contact> GetLocation(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());
                ds = productClient.GetLocation(ddlcompanyId, profile.DBConnection._constr);

                dt = ds.Tables[0];
                contact Loc = new contact();
                Loc.Name = "Select Location";
                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]["AddressLine1"].ToString();
                        LocList.Add(Loc);
                        Loc = new contact();
                    }
                }
            }
            catch
            {
            }
            finally
            {
                productClient.Close();
            }
            return(LocList);
        }
Ejemplo n.º 25
0
        public static long WMUpdateInventoryQty(long SiteID, long OpeningStock, long MaxStockLimit, long ReorderQty)
        {
            iProductMasterClient objService = new iProductMasterClient();
            long AvailableBalance           = 0;

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                SP_GetSiteWiseInventoryByProductIDs_Result rec = new SP_GetSiteWiseInventoryByProductIDs_Result();
                rec.SiteID        = SiteID;
                rec.OpeningStock  = OpeningStock;
                rec.ReorderQty    = ReorderQty;
                rec.MaxStockLimit = MaxStockLimit;
                AvailableBalance  = objService.UpdateProductInvetory_TempData(HttpContext.Current.Session.SessionID.ToString(), CurrentObject, profile.Personal.UserID.ToString(), rec, profile.DBConnection._constr);
            }
            catch { }
            finally { objService.Close(); }
            return(AvailableBalance);
        }
Ejemplo n.º 26
0
        protected void GVRateHistory()
        {
            iProductMasterClient productClient = new iProductMasterClient();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                // GVRateHistory1.DataSource = null;
                // GVRateHistory1.DataBind();

                if (hdnprodID.Value != "" && hdnprodID.Value != "0")
                {
                    //GVRateHistory1.DataSource = productClient.GetProductRateHistory(Convert.ToInt64(hdnprodID.Value), profile.DBConnection._constr);
                    //GVRateHistory1.DataBind();
                }
            }
            catch (Exception ex) { Login.Profile.ErrorHandling(ex, "ProductMaster", "GVRateHistory"); }
            finally { productClient.Close(); }
        }
        private void GetUOMList()
        {
            DataSet              ds;
            CustomProfile        profile       = CustomProfile.GetProfile();
            iProductMasterClient productClient = new iProductMasterClient();

            try
            {
                ds = productClient.GetUOMList(profile.DBConnection._constr);
                ddluom1.DataSource     = ds;
                ddluom1.DataTextField  = "Description";
                ddluom1.DataValueField = "ID";
                ddluom1.DataBind();
                ListItem lst = new ListItem {
                    Text = "-Select-", Value = "0"
                };
                ddluom1.Items.Insert(0, lst);
            }
            catch { }
            finally { productClient.Close(); }
        }
Ejemplo n.º 28
0
        private void GetRecordFromTempTableForUpdate()
        {
            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                mProductSpecificationDetail FillList = new mProductSpecificationDetail();

                iProductMasterClient productClient = new iProductMasterClient();

                FillList = productClient.GetSpecificationDetailFromTempTableBySequence(Session.SessionID, profile.Personal.UserID.ToString(), 0, Convert.ToInt16(hndsequence.Value), profile.DBConnection._constr);

                txtspecificationtitle.Text = FillList.SpecificationTitle;
                txtSpecificationDesc.Text  = FillList.SpecificationDescription;
                //AddressClient.Close();
                productClient.Close();
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "UC_AddressInformation", "GetRecordFromTempTableForUpdate");
            }
            finally
            {
            }
        }
        protected void imgbtndetails_OnClick(object sender, ImageClickEventArgs e)
        {
            PopUP.Visible = true;
            ImageButton btndetails = (ImageButton)sender;

            //GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer;
            Obout.Grid.TemplateContainer gvrow = (Obout.Grid.TemplateContainer)btndetails.NamingContainer;

            hdnprodID.Value = btndetails.ToolTip.ToString();

            CustomProfile        profile       = CustomProfile.GetProfile();
            iProductMasterClient productClient = new iProductMasterClient();
            GetProductDetail     obj           = new GetProductDetail();

            obj = productClient.GetProductDetailByProductID(Convert.ToInt64(hdnprodID.Value), profile.DBConnection._constr);
            productClient.Close();
            if (obj.Installable == Convert.ToBoolean(0))
            {
                this.ModelPopUp.Hide();
                //WebMsgBox.MsgBox.Show("Not Allowed");
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "showAlert('Not Allowed!', 'Error', '#');", true);
            }
            else
            {
                if (obj.ProductTypeID != null)
                {
                    ddlProductType.SelectedIndex = ddlProductType.Items.IndexOf(ddlProductType.Items.FindByValue(obj.ProductTypeID.Value.ToString()));
                }

                if (obj.ProductCategoryID != null)
                {
                    ddlCategory.SelectedIndex = ddlCategory.Items.IndexOf(ddlCategory.Items.FindByValue(obj.ProductCategoryID.Value.ToString()));
                }
                BindProductSubCategory();
                if (obj.ProductSubCategoryID != null)
                {
                    ddlSubCategory.SelectedIndex = ddlSubCategory.Items.IndexOf(ddlSubCategory.Items.FindByValue(obj.ProductSubCategoryID.Value.ToString()));
                }
                if (obj.ProductCode != null)
                {
                    txtProductCode.Text = obj.ProductCode.ToString();
                }
                if (obj.Name != null)
                {
                    txtProductName.Text = obj.Name.ToString();
                }
                if (obj.UOMID != null)
                {
                    ddlUOM.SelectedIndex = ddlUOM.Items.IndexOf(ddlUOM.Items.FindByValue(obj.UOMID.Value.ToString()));
                }
                if (obj.PrincipalPrice != null)
                {
                    txtPrincipalPrice.Text = obj.PrincipalPrice.ToString();
                }
                if (obj.Description != null)
                {
                    txtPrdDesc.Text = obj.Description.ToString();
                }

                this.ModelPopUp.Show();
            }
        }
        protected void btnnext_Click(object sender, EventArgs e)
        {
            DataSet              ds1 = new DataSet();
            DataTable            dt1 = new DataTable();
            iProductMasterClient productClient = new iProductMasterClient();
            iPartRequestClient   objService = new iPartRequestClient();
            CustomProfile        profile = CustomProfile.GetProfile();
            decimal              TotalProdQty = 0m, totalPrice = 0m;
            string   Title = "Direct Order Import";
            string   OrderNumber = "";
            DateTime orderdate = DateTime.Now;

            try
            {
                ds = productClient.GetDistinctPLCodes(profile.DBConnection._constr);
                //ds = productClient.GetDirectOrderData(profile.DBConnection._constr);
                dt = ds.Tables[0];
                for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
                {
                    DataSet   ds2         = new DataSet();
                    DataTable dt2         = new DataTable();
                    long      disDeptid   = long.Parse(ds.Tables[0].Rows[i]["deptId"].ToString());
                    long      DisLocId    = long.Parse(ds.Tables[0].Rows[i]["LocID"].ToString());
                    long      CompanyID   = long.Parse(ds.Tables[0].Rows[i]["ParentID"].ToString());
                    long      Orderheadid = 0;
                    ds2 = productClient.GetTotalForOrderHead(disDeptid, DisLocId, profile.DBConnection._constr);
                    dt2 = ds2.Tables[0];
                    if (dt2.Rows.Count > 0)
                    {
                        TotalProdQty = decimal.Parse(dt2.Rows[0]["TotalOrderQty"].ToString());
                        totalPrice   = decimal.Parse(dt2.Rows[0]["GrandTotalPrice"].ToString());
                    }
                    OrderNumber = productClient.getOrderFormatNumber(disDeptid, profile.DBConnection._constr);
                    ds1         = productClient.GetImportDatabyDisDeptLocId(disDeptid, DisLocId, profile.DBConnection._constr);
                    dt1         = ds1.Tables[0];
                    long sequence = 0;
                    for (int j = 0; j <= ds1.Tables[0].Rows.Count - 1; j++)
                    {
                        long UOMID = 16;

                        string  skucode          = ds1.Tables[0].Rows[j]["SKUCode"].ToString();
                        string  SkuName          = ds1.Tables[0].Rows[j]["Name"].ToString();
                        string  Description      = ds1.Tables[0].Rows[j]["Description"].ToString();
                        decimal AvailableBalance = decimal.Parse(ds1.Tables[0].Rows[j]["AvailableBalance"].ToString());
                        decimal RequestQty       = decimal.Parse(ds1.Tables[0].Rows[j]["asRequestQty"].ToString());
                        decimal OrderQty         = decimal.Parse(ds1.Tables[0].Rows[j]["OrderQty"].ToString());
                        decimal Price            = decimal.Parse(ds1.Tables[0].Rows[j]["Price"].ToString());
                        decimal Total            = decimal.Parse(ds1.Tables[0].Rows[j]["Total"].ToString());
                        long    locationid       = long.Parse(ds1.Tables[0].Rows[j]["locationid"].ToString());
                        long    prodID           = long.Parse(ds1.Tables[0].Rows[j]["prodID"].ToString());
                        long    storeID          = long.Parse(ds1.Tables[0].Rows[j]["ID"].ToString());
                        decimal Dispatch         = decimal.Parse(ds1.Tables[0].Rows[j]["TotalDispatchQty"].ToString());
                        //TotalProdQty = TotalProdQty + OrderQty;
                        //totalPrice = totalPrice + Total;
                        long     maxdeldays          = productClient.GetmaxDeliverydays(storeID, profile.DBConnection._constr);
                        DateTime Deliveryday         = DateTime.Now.AddDays(maxdeldays);
                        decimal  CurrentAvailBalance = AvailableBalance - OrderQty;
                        decimal  CurrentDispatchQty  = Dispatch + OrderQty;

                        sequence = sequence + 1;
                        if (j == 0)
                        {
                            Orderheadid = productClient.SaveOrderHeaderImport(storeID, orderdate, Deliveryday, 0, 3, profile.Personal.UserID, DateTime.Now, Title, DateTime.Now, TotalProdQty, totalPrice, OrderNumber, locationid, profile.DBConnection._constr);
                        }
                        productClient.SaveOrderDetailImport(Orderheadid, prodID, OrderQty, UOMID, sequence, SkuName, Description, skucode, Price, Total, profile.DBConnection._constr);
                        productClient.updateproductstockdetailimport(storeID, prodID, CurrentAvailBalance, CurrentDispatchQty, profile.DBConnection._constr);
                    }
                    productClient.ImportMsgTransHeader(Orderheadid, profile.DBConnection._constr);
                    int x = objService.EmailSendWhenRequestSubmit(Orderheadid, profile.DBConnection._constr);

                    DataSet dss = new DataSet();
                    dss = objService.GetApproverDepartmentWise(disDeptid, profile.DBConnection._constr);
                    for (int t = 0; t <= dss.Tables[0].Rows.Count - 1; t++)
                    {
                        long approverid = Convert.ToInt64(dss.Tables[0].Rows[t]["UserId"].ToString());

                        objService.EmailSendofApproved(approverid, Orderheadid, profile.DBConnection._constr);
                    }
                }

                productClient.DeleteOrderImport(profile.DBConnection._constr);
                Response.Redirect("ImportOrderF.aspx");
            }
            catch
            {
                productClient.DeleteSKUPricetemp(profile.DBConnection._constr);
            }
            finally
            {
                productClient.Close();
            }
        }