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(); }
        }
        public void GetEditdata()
        {
            DataSet              ds;
            DataTable            dt;
            CustomProfile        profile       = CustomProfile.GetProfile();
            iProductMasterClient productClient = new iProductMasterClient();

            try
            {
                ds = productClient.GetEditmpackUOmdetail(UomPackId, profile.DBConnection._constr);
                dt = ds.Tables[0];
                if (dt.Rows.Count > 0)
                {
                    long Id = long.Parse(dt.Rows[0]["ID"].ToString());
                    GetUOMList();

                    if (ddluom1.Items.Count >= 1)
                    {
                        ddluom1.SelectedIndex = 0;
                    }
                    ddluom1.SelectedIndex      = ddluom1.Items.IndexOf(ddluom1.Items.FindByValue(dt.Rows[0]["ID"].ToString()));
                    ddluom1.SelectedItem.Value = Id.ToString();
                    ddluom1.SelectedItem.Text  = dt.Rows[0]["Description"].ToString();

                    //ddluom1.SelectedItem.Value = dt.Rows[0]["ID"].ToString();
                    //ddluom1.SelectedItem.Text = dt.Rows[0]["Description"].ToString();
                    txtQuantity.Text = dt.Rows[0]["Quantity"].ToString();
                    txtsequence.Text = dt.Rows[0]["Sequence"].ToString();
                }
            }
            catch {}
            finally{}
        }
Ejemplo n.º 3
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.º 4
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.º 5
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);
        }
        public void fillEngine()
        {
            ChartProperty       objclsChartProperty = new ChartProperty();
            iUserCreationClient UserCreationClient  = new iUserCreationClient();
            CustomProfile       profile             = CustomProfile.GetProfile();

            str = hfCount.Value;

            if (ddlSite.SelectedIndex == 0)
            {
                eng = str;
            }
            else
            {
                eng = str;
            }

            string p = eng;
            iEngineMasterClient    EngineClient    = new iEngineMasterClient();
            iProductMasterClient   productClient   = new iProductMasterClient();
            iPartRequisitionClient RequsitonClient = new iPartRequisitionClient();

            if (p != "")
            {
                chkEngineList.DataSource = EngineClient.GetEngineOfSite(p, profile.DBConnection._constr);
                chkEngineList.DataBind();
            }
        }
Ejemplo n.º 7
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.º 8
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(); }
        }
Ejemplo n.º 9
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.º 10
0
        public void fillProduct()
        {
            ChartProperty objclsChartProperty = new ChartProperty();

            objclsChartProperty.QueryParameter = "";
            iUserCreationClient UserCreationClient = new iUserCreationClient();
            CustomProfile       profile            = CustomProfile.GetProfile();

            string abc = hfEng.Value;

            str = hfCount.Value;


            if (ddlSite.SelectedIndex == 0)
            {
                eng = str;
            }
            else
            {
                eng = str;
            }

            string p = eng;

            for (int y = 0; y <= chkEngineList.Items.Count - 1; y++)
            {
                if (prd == null)
                {
                    if (chkEngineList.Items[y].Selected == true)
                    {
                        prd = prd + chkEngineList.Items[y].Value;
                    }
                }
                else
                {
                    if (chkEngineList.Items[y].Selected == true)
                    {
                        prd = prd + "," + chkEngineList.Items[y].Value;
                    }
                }
            }
            string q = prd;

            string fdt = frmdate.Date.Value.ToString("yyyy-MM-dd");
            string tdt = todate.Date.Value.ToString("yyyy-MM-dd");

            iEngineMasterClient  EngineClient  = new iEngineMasterClient();
            iProductMasterClient productClient = new iProductMasterClient();

            //iPartRequisitionClient RequsitonClient = new iPartRequisitionClient();

            if (q != null)
            {
                chkProductLst.DataSource = productClient.GetProductofEngine(fdt, tdt, p, q, profile.DBConnection._constr);
                chkProductLst.DataBind();
            }
        }
        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");
        }
Ejemplo n.º 12
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();
        }
Ejemplo n.º 13
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.º 14
0
        public void GetTransferList()
        {
            CustomProfile        profile = CustomProfile.GetProfile();
            iProductMasterClient astlst  = new iProductMasterClient();
            List <POR_VW_ToolTransferDetails> transfrLst = new List <POR_VW_ToolTransferDetails>();

            transfrLst = astlst.GetTransferList(profile.DBConnection._constr).ToList();

            GvAssetTransfer.DataSource = transfrLst;
            GvAssetTransfer.DataBind();
        }
Ejemplo n.º 15
0
        protected void Btncancel_Click(object sender, EventArgs e)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();

            if (hdndeptid.Value != "")
            {
                productClient.deleteimportlogdata(long.Parse(hdndeptid.Value), profile.DBConnection._constr);
            }
            Response.Redirect("ImportDSo.aspx"); //CommonControls
        }
Ejemplo n.º 16
0
        protected void btnProductMasterUploadImg_OnClick(object sender, EventArgs e)
        {
            if (FileUploadProductMasterImg.PostedFiles != null)
            {
                CustomProfile        profile       = CustomProfile.GetProfile();
                iProductMasterClient productClient = new iProductMasterClient();

                string uploadfilepath = HttpRuntime.AppDomainAppPath;

                foreach (PostedFileInfo info in FileUploadProductMasterImg.PostedFiles)
                {
                    string type = info.ContentType.Replace("image/", "").Replace("application/", "");
                    //type = type.Replace("application/", "");
                    string gridDisplayPath = "TempImg\\" + Session.SessionID.ToString() + DateTime.Now.Ticks.ToString() + "." + type;
                    string SaveAsPath      = uploadfilepath + "\\" + gridDisplayPath;
                    //SaveAsPath = SaveAsPath.Replace('\\', '/');

                    if (!(Directory.Exists(uploadfilepath + "/TempImg")))
                    {
                        Directory.CreateDirectory(uploadfilepath + "/TempImg");
                    }
                    info.SaveAs(SaveAsPath);

                    tImage UploadedImage = new tImage();
                    UploadedImage.ObjectName  = "Product";
                    UploadedImage.ReferenceID = Convert.ToInt32(hdnprodID.Value);
                    UploadedImage.ImageName   = info.FileName;
                    UploadedImage.ImgeTitle   = txtImageTitle.Text;
                    UploadedImage.ImageDesc   = txtImageDescription.Text;
                    UploadedImage.Path        = gridDisplayPath;
                    UploadedImage.Extension   = type;
                    //UploadedImage.Active = "Y";
                    if (rbtnYes.Checked == true)
                    {
                        UploadedImage.Active = "Y";
                    }
                    else
                    {
                        UploadedImage.Active = "N";
                    }
                    UploadedImage.CreatedBy    = profile.Personal.UserID.ToString();
                    UploadedImage.CreationDate = DateTime.Now;
                    UploadedImage.CompanyID    = profile.Personal.CompanyID;
                    productClient.AddTempProductImages(UploadedImage, Session.SessionID, profile.Personal.UserID.ToString(), profile.DBConnection._constr);
                }

                GVImages.DataSource = productClient.GetTempSaveProductImagesBySessionID(Session.SessionID, profile.Personal.UserID.ToString(), profile.DBConnection._constr);
                GVImages.DataBind();
                txtImageDescription.Text = "";
                txtImageTitle.Text       = "";
            }
        }
        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.º 18
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(); }
        }
Ejemplo n.º 19
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();
        }
        public static void PMSaveContactD(string selectedIds)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();
            string ids = selectedIds.ToString();

            string[] words = ids.Split(',');
            for (int i = 1; i < words.Length; i++)
            {
                long ContactId  = long.Parse(words[i]);
                long templateid = 0;
                productClient.InsertIntoDistribution(templateid, ContactId, profile.DBConnection._constr);
            }
            //string selectedIds = rec["SelectedIds"].ToString();
        }
Ejemplo n.º 21
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);
        }
        public void getDepartment(long Companyid)
        {
            DataSet              ds;
            CustomProfile        profile       = CustomProfile.GetProfile();
            iProductMasterClient productClient = new iProductMasterClient();

            ds = productClient.GetDepartment(Companyid, profile.DBConnection._constr);
            ddldepartment.DataSource     = ds;
            ddldepartment.DataTextField  = "Territory";
            ddldepartment.DataValueField = "ID";
            ddldepartment.DataBind();
            ListItem lst = new ListItem {
                Text = "-Select-", Value = "0"
            };

            ddldepartment.Items.Insert(0, lst);
        }
        public void GetLocation(long Companyid)
        {
            DataSet              ds;
            CustomProfile        profile       = CustomProfile.GetProfile();
            iProductMasterClient productClient = new iProductMasterClient();

            ds = productClient.GetLocation(Companyid, profile.DBConnection._constr);
            ddllocation.DataSource     = ds;
            ddllocation.DataTextField  = "AddressLine1";
            ddllocation.DataValueField = "ID";
            ddllocation.DataBind();
            ListItem lst = new ListItem {
                Text = "-Select-", Value = "0"
            };

            ddllocation.Items.Insert(0, lst);
        }
        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.º 26
0
        public static long PMSaveNewRates(object newPrice0)
        {
            long result = 0;

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

                iProductMasterClient productClient = new iProductMasterClient();
                CustomProfile        profile       = CustomProfile.GetProfile();
                mToolSiteHistory     newSite       = new mToolSiteHistory();


                if (dictionary["ProdID"].ToString() != "0" && dictionary["ProdID"].ToString() != "")
                {
                    newSite.ProdID = Convert.ToInt64(dictionary["ProdID"].ToString());
                    newSite.SiteID = Convert.ToInt64(dictionary["Site"].ToString());
                    if (dictionary["EffectiveDate"] != null)
                    {
                        newSite.EffectiveDate = Convert.ToDateTime(dictionary["EffectiveDate"]);
                    }
                    if (dictionary["StartDate"] != null)
                    {
                        newSite.StartDate = Convert.ToDateTime(dictionary["StartDate"]);
                    }
                    if (dictionary["EndDate"] != null)
                    {
                        newSite.Enddate = Convert.ToDateTime(dictionary["EndDate"]);
                    }

                    newSite.CreatedBy    = profile.Personal.UserID;
                    newSite.CreationDate = DateTime.Now;
                    newSite.Active       = true;
                    result = productClient.SaveToolSiteHistory(newSite, profile.DBConnection._constr);
                }
                else
                {
                    result = 0;
                }
            }
            catch (Exception ex) { }
            finally {  }
            return(result);
        }
Ejemplo n.º 27
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.º 28
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();
            }
        }
Ejemplo n.º 29
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.º 30
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();
        }