/// <summary>
 /// Function to edit
 /// </summary>
 public void Editfunction()
 {
     try
     {
         ExchangeRateInfo infoExchangeRate = new ExchangeRateInfo();
         ExchangeRateBll  BllExchangeRate  = new ExchangeRateBll();
         infoExchangeRate.CurrencyId     = Convert.ToDecimal(cmbCurrency.SelectedValue.ToString());
         infoExchangeRate.Date           = Convert.ToDateTime(dtpDate.Text.Trim().ToString());
         infoExchangeRate.Rate           = Convert.ToDecimal(txtExchangeRate.Text.Trim().ToString());
         infoExchangeRate.Narration      = txtNarration.Text.Trim();
         infoExchangeRate.Extra1         = String.Empty;
         infoExchangeRate.Extra2         = String.Empty;
         infoExchangeRate.ExchangeRateId = decId;
         if (BllExchangeRate.ExchangeRateCheckExistence(Convert.ToDateTime(txtDate.Text.Trim().ToString()), Convert.ToDecimal(cmbCurrency.SelectedValue.ToString()), decExchangeRateId) == false)
         {
             if (ExchangeRateCheck())
             {
                 BllExchangeRate.ExchangeRateEdit(infoExchangeRate);
                 Messages.UpdatedMessage();
                 SearchClear();
                 Clear();
             }
         }
         else
         {
             Messages.InformationMessage("Already exists");
             cmbCurrency.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("ER3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Edit function
 /// </summary>
 public void EditFunction()
 {
     try
     {
         StandardRateInfo infoStandardRate = new StandardRateInfo();
         StandardRateSP   spStandardRate   = new StandardRateSP();
         infoStandardRate.StandardRateId = decStandardRate;
         infoStandardRate.ApplicableFrom = Convert.ToDateTime(txtFromDate.Text.ToString());
         infoStandardRate.ApplicableTo   = Convert.ToDateTime(txtToDate.Text.ToString());
         infoStandardRate.ProductId      = decProduct;
         infoStandardRate.UnitId         = decUnitId;
         infoStandardRate.BatchId        = Convert.ToDecimal(cmbBatch.SelectedValue);
         infoStandardRate.Rate           = Convert.ToDecimal(txtRate.Text.ToString());
         infoStandardRate.Extra1         = string.Empty;
         infoStandardRate.Extra2         = string.Empty;
         if (spStandardRate.StandardrateCheckExistence(decStandardRateId, Convert.ToDateTime(txtFromDate.Text.ToString()), Convert.ToDateTime(txtToDate.Text.ToString()), decProduct, infoStandardRate.BatchId) == false)
         {
             spStandardRate.StandardRateEdit(infoStandardRate);
             Messages.UpdatedMessage();
             GridFill(decProduct);
             Clear();
         }
         else
         {
             Messages.InformationMessage("Standard rate already exist for selected product and dates");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SRP6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #3
0
 /// <summary>
 /// update function
 /// </summary>
 public void EditFunction()
 {
     try
     {
         UnitSP   spUnit   = new UnitSP();
         UnitInfo infoUnit = new UnitInfo();
         infoUnit.UnitName          = txtUnitname.Text.Trim();
         infoUnit.noOfDecimalplaces = Convert.ToDecimal(txtDecimalPlaces.Text.ToString());
         infoUnit.Narration         = txtNarration.Text.Trim();
         infoUnit.formalName        = txtFormalName.Text.Trim();
         infoUnit.UnitId            = decUnitid;
         infoUnit.Extra1            = string.Empty;
         infoUnit.Extra2            = string.Empty;
         if (CheckExistenceOfUnitName() == false)
         {
             if (spUnit.UnitEdit(infoUnit))
             {
                 Messages.UpdatedMessage();
                 Clear();
             }
         }
         else
         {
             Messages.InformationMessage("Already exists");
             txtUnitname.Focus();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "U4:" + ex.Message;
     }
 }
Пример #4
0
 /// <summary>
 /// Function to edit
 /// </summary>
 public void Editfunction()
 {
     try
     {
         ExchangeRateInfo infoExchangeRate = new ExchangeRateInfo();
         ExchangeRateSP   spExchangeRate   = new ExchangeRateSP();
         infoExchangeRate.CurrencyId     = Convert.ToDecimal(cmbCurrency.SelectedValue.ToString());
         infoExchangeRate.Date           = Convert.ToDateTime(dtpDate.Text.Trim().ToString());
         infoExchangeRate.Rate           = Convert.ToDecimal(txtExchangeRate.Text.Trim().ToString());
         infoExchangeRate.Narration      = txtNarration.Text.Trim();
         infoExchangeRate.Extra1         = String.Empty;
         infoExchangeRate.Extra2         = String.Empty;
         infoExchangeRate.ExchangeRateId = decId;
         if (spExchangeRate.ExchangeRateCheckExistence(Convert.ToDateTime(txtDate.Text.Trim().ToString()), Convert.ToDecimal(cmbCurrency.SelectedValue.ToString()), decExchangeRateId) == false)
         {
             if (ExchangeRateCheck())
             {
                 spExchangeRate.ExchangeRateEdit(infoExchangeRate);
                 Messages.UpdatedMessage();
                 SearchClear();
                 Clear();
             }
         }
         else
         {
             Messages.InformationMessage("Already exists");
             cmbCurrency.Focus();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "ER3:" + ex.Message;
     }
 }
Пример #5
0
 /// <summary>
 /// Function to Update the items
 /// </summary>
 public void EditFunction()
 {
     try
     {
         RoleInfo infoRole = new RoleInfo();
         RoleSP   spRole   = new RoleSP();
         infoRole.RoleId    = Convert.ToDecimal(dgvRole.CurrentRow.Cells["dgvtxtRoleId"].Value);
         infoRole.Role      = txtRole.Text.Trim();
         infoRole.Narration = txtNarration.Text.Trim();
         infoRole.Extra1    = string.Empty;
         infoRole.Extra2    = string.Empty;
         string strRole = txtRole.Text.Trim();
         if (spRole.RoleCheckExistence(decRoleId, strRole) == false)
         {
             spRole.RoleEdit(infoRole);
             Messages.UpdatedMessage();
             ClearFunction();
         }
         else
         {
             Messages.InformationMessage("Role already exists");
             txtRole.Focus();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "RL:4" + ex.Message;
     }
 }
Пример #6
0
 /// <summary>
 /// Function to Update the items
 /// </summary>
 public void EditFunction()
 {
     try
     {
         RoleInfo infoRole = new RoleInfo();
         RoleBll  BllRole  = new RoleBll();
         infoRole.RoleId    = Convert.ToDecimal(dgvRole.CurrentRow.Cells["dgvtxtRoleId"].Value);
         infoRole.Role      = txtRole.Text.Trim();
         infoRole.Narration = txtNarration.Text.Trim();
         infoRole.Extra1    = string.Empty;
         infoRole.Extra2    = string.Empty;
         string strRole = txtRole.Text.Trim();
         if (BllRole.RoleCheckExistence(decRoleId, strRole) == false)
         {
             BllRole.RoleEdit(infoRole);
             Messages.UpdatedMessage();
             ClearFunction();
         }
         else
         {
             Messages.InformationMessage("Role already exists");
             txtRole.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("RL:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         BonusDedutionInfo infoBonusDeduction = new BonusDedutionInfo();
         BonusDedutionSP   spBonusDeduction   = new BonusDedutionSP();
         infoBonusDeduction.Date             = Convert.ToDateTime(dtpDate.Text.ToString());
         infoBonusDeduction.EmployeeId       = Convert.ToDecimal(cmbEmployeeCode.SelectedValue.ToString());
         infoBonusDeduction.Month            = Convert.ToDateTime(dtpMonth.Text.ToString());
         infoBonusDeduction.BonusAmount      = Convert.ToDecimal(txtBonusAmount.Text.ToString());
         infoBonusDeduction.DeductionAmount  = Convert.ToDecimal(txtDeductionAmount.Text.ToString());
         infoBonusDeduction.Narration        = txtNarration.Text;
         infoBonusDeduction.Extra1           = string.Empty;
         infoBonusDeduction.Extra2           = string.Empty;
         infoBonusDeduction.BonusDeductionId = decBonusId;
         spBonusDeduction.BonusDedutionEdit(infoBonusDeduction);
         Messages.UpdatedMessage();
         btnSave.Text      = "Save";
         btnDelete.Enabled = false;
         dtpDate.Focus();
         if (frmBonusDeductionRegisterObj != null)
         {
             frmBonusDeductionRegisterObj.Show();
             this.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("BD3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #8
0
 /// <summary>
 /// Edit Function
 /// </summary>
 public void EditFunction()
 {
     try
     {
         ServiceSP   spService   = new ServiceSP();
         ServiceInfo infoService = new ServiceInfo();
         infoService.ServiceId         = Convert.ToDecimal(dgvService.CurrentRow.Cells["dgvtxtServiceId"].Value.ToString());
         infoService.ServiceName       = txtServiceName.Text.Trim();
         infoService.ServiceCategoryId = Convert.ToDecimal(cmbCategory.SelectedValue.ToString());
         infoService.Rate      = Convert.ToDecimal(txtRate.Text.ToString());
         infoService.Narration = txtNarration.Text.Trim();
         infoService.Extra1    = string.Empty;
         infoService.Extra2    = string.Empty;
         if (CheckExistenceOfServiceName() == false)
         {
             if (spService.ServiceEdit(infoService))
             {
                 Messages.UpdatedMessage();
                 Clear();
                 txtServiceName.Focus();
             }
         }
         else
         {
             Messages.InformationMessage("Already exists");
             txtServiceName.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Ser12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #9
0
 /// <summary>
 /// Function to Edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         CurrencyInfo infoCurrency = new CurrencyInfo();
         CurrencySP   spCurrency   = new CurrencySP();
         infoCurrency.CurrencySymbol    = txtSymbol.Text.Trim();
         infoCurrency.CurrencyName      = txtName.Text.Trim();
         infoCurrency.SubunitName       = txtSubUnit.Text.Trim();
         infoCurrency.NoOfDecimalPlaces = Convert.ToInt32(txtDecimalPlaces.Text.Trim());
         infoCurrency.Narration         = txtNarration.Text.Trim();
         infoCurrency.IsDefault         = false;
         infoCurrency.Extra1            = String.Empty;
         infoCurrency.Extra2            = String.Empty;
         infoCurrency.CurrencyId        = decId;
         if (spCurrency.CurrencyNameCheckExistence(txtName.Text.Trim(), txtSymbol.Text.Trim(), decCurrencyId) == false)
         {
             spCurrency.CurrencyEdit(infoCurrency);
             Messages.UpdatedMessage();
             SearchClear();
             Clear();
         }
         else
         {
             Messages.InformationMessage("Currency name already exist");
             txtName.Focus();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "C2:" + ex.Message;
     }
 }
Пример #10
0
 /// <summary>
 /// Function for Edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         PayHeadSP   spPayhead   = new PayHeadSP();
         PayHeadInfo infoPayhead = new PayHeadInfo();
         infoPayhead.PayHeadId   = decPayHeadId;
         infoPayhead.PayHeadName = txtPayheadName.Text.Trim();
         infoPayhead.Type        = cmbPayheadType.Text;
         infoPayhead.Narration   = txtPayheadNarration.Text.Trim();
         if (spPayhead.PayheadCheckExistence(txtPayheadName.Text.Trim(), infoPayhead.PayHeadId) == false)
         {
             spPayhead.PayHeadEdit(infoPayhead);
             GridFill();
             Messages.UpdatedMessage();
             Clear();
         }
         else
         {
             Messages.InformationMessage("Payhead name already exist");
             txtPayheadName.Focus();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PH2:" + ex.Message;
     }
 }
 /// <summary>
 /// Function for Edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         PayHeadBll  BllPayHead  = new PayHeadBll();
         PayHeadInfo infoPayhead = new PayHeadInfo();
         infoPayhead.PayHeadId   = decPayHeadId;
         infoPayhead.PayHeadName = txtPayheadName.Text.Trim();
         infoPayhead.Type        = cmbPayheadType.Text;
         infoPayhead.Narration   = txtPayheadNarration.Text.Trim();
         if (BllPayHead.PayheadCheckExistence(txtPayheadName.Text.Trim(), infoPayhead.PayHeadId) == false)
         {
             BllPayHead.PayHeadEdit(infoPayhead);
             GridFill();
             Messages.UpdatedMessage();
             Clear();
         }
         else
         {
             Messages.InformationMessage("Payhead name already exist");
             txtPayheadName.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PH2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #12
0
 /// <summary>
 /// update function
 /// </summary>
 public void EditFunction()
 {
     try
     {
         UnitBll  bllUnit  = new UnitBll();
         UnitInfo infoUnit = new UnitInfo();
         infoUnit.UnitName          = txtUnitname.Text.Trim();
         infoUnit.noOfDecimalplaces = Convert.ToDecimal(txtDecimalPlaces.Text.ToString());
         infoUnit.Narration         = txtNarration.Text.Trim();
         infoUnit.formalName        = txtFormalName.Text.Trim();
         infoUnit.UnitId            = decUnitid;
         infoUnit.Extra1            = string.Empty;
         infoUnit.Extra2            = string.Empty;
         if (CheckExistenceOfUnitName() == false)
         {
             if (bllUnit.UnitEdit(infoUnit))
             {
                 Messages.UpdatedMessage();
                 Clear();
             }
         }
         else
         {
             Messages.InformationMessage("Already exists");
             txtUnitname.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("U4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #13
0
        /// <summary>
        /// Function To edit existing productgroup
        /// </summary>
        private void EditFunction()
        {
            try
            {
                ProductGroupInfo infoProductGroup = new ProductGroupInfo();
                ProductGroupBll  BllProductGroup  = new ProductGroupBll();
                infoProductGroup.GroupId    = Convert.ToDecimal(dgvProductGroup.CurrentRow.Cells["dgvtxtgroupId"].Value);
                infoProductGroup.GroupName  = txtProductGroupName.Text.Trim();
                infoProductGroup.GroupUnder = Convert.ToDecimal(cmbUnder.SelectedValue.ToString());
                infoProductGroup.Narration  = txtNarration.Text.Trim();
                infoProductGroup.Extra1     = string.Empty;
                infoProductGroup.Extra2     = string.Empty;

                if (BllProductGroup.ProductGroupCheckExistence(txtProductGroupName.Text.Trim().ToString(), decId) == false)
                {
                    BllProductGroup.ProductGroupEdit(infoProductGroup);
                    Messages.UpdatedMessage();
                    ProductGroupUnderComboFill();
                    ProductGroupUnderComboFillForSearch();
                    GridFill();
                    Clear();
                    txtProductGroupName.Focus();
                }
                else
                {
                    Messages.InformationMessage(" Product group already exists");
                    txtProductGroupName.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("PG5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 /// <summary>
 /// Function to Edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         CurrencyInfo infoCurrency = new CurrencyInfo();
         CurrencyBll  BllCurrency  = new CurrencyBll();
         infoCurrency.CurrencySymbol    = txtSymbol.Text.Trim();
         infoCurrency.CurrencyName      = txtName.Text.Trim();
         infoCurrency.SubunitName       = txtSubUnit.Text.Trim();
         infoCurrency.NoOfDecimalPlaces = Convert.ToInt32(txtDecimalPlaces.Text.Trim());
         infoCurrency.Narration         = txtNarration.Text.Trim();
         infoCurrency.IsDefault         = false;
         infoCurrency.Extra1            = String.Empty;
         infoCurrency.Extra2            = String.Empty;
         infoCurrency.CurrencyId        = decId;
         if (BllCurrency.CurrencyNameCheckExistence(txtName.Text.Trim(), txtSymbol.Text.Trim(), decCurrencyId) == false)
         {
             BllCurrency.CurrencyEdit(infoCurrency);
             Messages.UpdatedMessage();
             SearchClear();
             Clear();
         }
         else
         {
             Messages.InformationMessage("Currency name already exist");
             txtName.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("C2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #15
0
 /// <summary>
 /// Edit Function
 /// </summary>
 public void EditFunction()
 {
     try
     {
         SizeSP   spSize   = new SizeSP();
         SizeInfo infoSize = new SizeInfo();
         infoSize.Size      = txtSize.Text.Trim();
         infoSize.Narration = txtNarration.Text.Trim();
         infoSize.Extra1    = String.Empty;
         infoSize.Extra2    = String.Empty;
         infoSize.SizeId    = decSizeId;
         if (spSize.SizeNameCheckExistence(txtSize.Text.Trim().ToString(), decSizeId) == false)
         {
             if (spSize.SizeEditing(infoSize))
             {
                 Messages.UpdatedMessage();
                 GridFill();
                 Clear();
             }
         }
         else
         {
             Messages.InformationMessage("Size already exist");
             txtSize.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SZ3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #16
0
 /// <summary>
 /// Function to edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         BrandSP   spBrand   = new BrandSP();
         BrandInfo infoBrand = new BrandInfo();
         infoBrand.BrandName    = txtBrandName.Text.Trim();
         infoBrand.Narration    = txtNarration.Text.Trim();
         infoBrand.Manufacturer = txtManufacturer.Text.Trim();
         infoBrand.Extra1       = string.Empty;
         infoBrand.Extra2       = string.Empty;
         infoBrand.ExtraDate    = DateTime.Now;
         infoBrand.BrandId      = decBrandId;
         if (txtBrandName.Text != strBrandName)
         {
             if (CheckExistenceOfBrandName() == false)
             {
                 if (spBrand.BrandEdit(infoBrand))
                 {
                     Messages.UpdatedMessage();
                     Clear();
                     txtBrandName.Focus();
                 }
                 else if (infoBrand.BrandId == 1)
                 {
                     Messages.InformationMessage("Cannot update");
                     Clear();
                     txtBrandName.Focus();
                 }
             }
             else
             {
                 Messages.InformationMessage("Brand name already exists");
                 txtBrandName.Focus();
             }
         }
         else if (infoBrand.BrandId == 1)
         {
             Messages.InformationMessage("Cannot update");
             Clear();
             txtBrandName.Focus();
         }
         else
         {
             if (spBrand.BrandEdit(infoBrand))
             {
                 Messages.UpdatedMessage();
                 Clear();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("BR3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Edit function
 /// </summary>
 public void EditFunction()
 {
     try
     {
         SuffixPrefixSettingsBll BllSuffixPrefixSettings = new SuffixPrefixSettingsBll();
         SuffixPrefixInfo        infoSuffixPrefix        = new SuffixPrefixInfo();
         infoSuffixPrefix.FromDate = Convert.ToDateTime(txtFromDate.Text.ToString());
         infoSuffixPrefix.ToDate   = Convert.ToDateTime(txtToDate.Text.ToString());
         String strvouchertype = (cmbVoucherType.SelectedValue.ToString());
         infoSuffixPrefix.VoucherTypeId = Convert.ToDecimal(strvouchertype.ToString());
         infoSuffixPrefix.Prefix        = txtPrefix.Text.Trim();
         infoSuffixPrefix.Suffix        = txtSufix.Text.Trim();
         infoSuffixPrefix.StartIndex    = Convert.ToDecimal(txtStartIndex.Text.ToString());
         if (cbxPrefillWithZero.Checked)
         {
             infoSuffixPrefix.PrefillWithZero      = true;
             infoSuffixPrefix.WidthOfNumericalPart = Convert.ToInt32(txtWidthofNumericalPart.Text.ToString());
         }
         else
         {
             infoSuffixPrefix.PrefillWithZero      = false;
             infoSuffixPrefix.WidthOfNumericalPart = 0;
         }
         infoSuffixPrefix.Narration      = txtNarration.Text.Trim();
         infoSuffixPrefix.Extra1         = string.Empty;
         infoSuffixPrefix.Extra2         = string.Empty;
         infoSuffixPrefix.SuffixprefixId = decSuffixPrefixId;
         if (BllSuffixPrefixSettings.SuffixPrefixCheckExistenceForAdd(txtFromDate.Text.ToString(), txtToDate.Text.ToString(), Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()), decSuffixPrefixId) == false)
         {
             if (BllSuffixPrefixSettings.SuffixPrefixSettingsEdit(infoSuffixPrefix))
             {
                 Messages.UpdatedMessage();
                 Clear();
             }
             else
             {
                 Messages.ReferenceExistsMessageForUpdate();
                 cmbVoucherType.Focus();
             }
         }
         else
         {
             Messages.InformationMessage("Voucher type already exist for  dates");
             cmbVoucherType.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SPS5" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #18
0
 /// <summary>
 /// Function to edit the existing rack
 /// </summary>
 public void EditFunction()
 {
     try
     {
         RackSP   spRack   = new RackSP();
         RackInfo rackInfo = new RackInfo();
         rackInfo.RackName  = txtRackName.Text.Trim();
         rackInfo.GodownId  = Convert.ToDecimal(cmbGodown.SelectedValue.ToString());
         rackInfo.Narration = txtNarration.Text.Trim();
         rackInfo.ExtraDate = DateTime.Now;
         rackInfo.Extra1    = string.Empty;
         rackInfo.Extra2    = string.Empty;
         rackInfo.RackId    = decRackId;
         if (txtRackName.Text != strRackName)
         {
             if (CheckExistenceOfRackName() == false)
             {
                 if (spRack.RackEdit(rackInfo))
                 {
                     Messages.UpdatedMessage();
                     Clear();
                 }
             }
             else
             {
                 Messages.InformationMessage("Already exists");
                 txtRackName.Focus();
             }
         }
         else if (rackInfo.RackId == 1)
         {
             Messages.InformationMessage("Cannot update");
             Clear();
             txtRackName.Focus();
         }
         else
         {
             if (spRack.RackEdit(rackInfo))
             {
                 Messages.UpdatedMessage();
                 Clear();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("R8:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #19
0
 /// <summary>
 /// Function for Edit
 /// </summary>
 private void EditFunction()
 {
     try
     {
         DesignationInfo infoDesignation = new DesignationInfo();
         //DesignationSP spDesignation = new DesignationSP();
         DesiginationBll bllDesigination = new DesiginationBll();
         if (txtAdvanceAmount.Text == string.Empty)
         {
             infoDesignation.AdvanceAmount = 0;
         }
         else
         {
             infoDesignation.AdvanceAmount = Convert.ToDecimal(txtAdvanceAmount.Text.Trim());
         }
         infoDesignation.DesignationName = txtDesignationName.Text.TrimEnd();
         if (txtCLInMonth.Text == string.Empty)
         {
             infoDesignation.LeaveDays = 0;
         }
         else
         {
             infoDesignation.LeaveDays = Convert.ToDecimal(txtCLInMonth.Text.Trim());
         }
         infoDesignation.Narration = txtNarration.Text.Trim();
         infoDesignation.Extra1    = string.Empty;
         infoDesignation.Extra2    = string.Empty;
         infoDesignation.ExtraDate = DateTime.Now;
         if (CheckExistanceOfDesignation(txtDesignationName.Text.Trim(), decDesignationId) == false)
         {
             infoDesignation.DesignationId = decDesignationId;
             if (bllDesigination.DesignationEdit(infoDesignation))
             {
                 Messages.UpdatedMessage();
             }
         }
         else
         {
             Messages.InformationMessage("Designation already exist");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("D9:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #20
0
 /// <summary>
 /// Function to edit the Pricing level
 /// </summary>
 public void EditFunction()
 {
     try
     {
         PricingLevelSP   spPricingLevel   = new PricingLevelSP();
         PricingLevelInfo infoPricingLevel = new PricingLevelInfo();
         infoPricingLevel.PricinglevelName = txtPricingLevelName.Text.Trim();
         infoPricingLevel.Narration        = txtNarration.Text.Trim();
         infoPricingLevel.Extra1           = string.Empty;
         infoPricingLevel.Extra2           = string.Empty;
         infoPricingLevel.PricinglevelId   = Convert.ToDecimal(dgvPricingLevel.CurrentRow.Cells[1].Value.ToString());
         if (txtPricingLevelName.Text.ToString() != strPricingLevel)
         {
             if (spPricingLevel.PricingLevelCheckIfExist(txtPricingLevelName.Text.Trim().ToString(), decPricingLevel) == false)
             {
                 if (spPricingLevel.PricingLevelEditParticularFields(infoPricingLevel))
                 {
                     Messages.UpdatedMessage();
                     Clear();
                 }
                 else if (infoPricingLevel.PricinglevelId == 1)
                 {
                     Messages.InformationMessage("Cannot update");
                     Clear();
                     txtPricingLevelName.Focus();
                 }
             }
             else
             {
                 Messages.InformationMessage("Pricing level name already exist");
                 txtPricingLevelName.Focus();
             }
         }
         else
         {
             spPricingLevel.PricingLevelEditParticularFields(infoPricingLevel);
             Messages.UpdatedMessage();
             Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PL2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         CounterInfo infoCounter = new CounterInfo();
         CounterBll  bllCounter  = new CounterBll();
         infoCounter.CounterName = txtCounterName.Text.Trim();
         infoCounter.Narration   = txtNarration.Text.Trim();
         infoCounter.Extra1      = string.Empty;
         infoCounter.Extra2      = string.Empty;
         infoCounter.CounterId   = Convert.ToDecimal(dgvCounter.CurrentRow.Cells["dgvtxtcounterId"].Value.ToString());
         if (txtCounterName.Text.ToString() != strCounterName)
         {
             if (bllCounter.CounterCheckIfExist(txtCounterName.Text.Trim(), decCounterId) == false)
             {
                 if (bllCounter.CounterEditParticularField(infoCounter))
                 {
                     Messages.UpdatedMessage();
                     Clear();
                 }
                 else if (infoCounter.CounterId == 1)
                 {
                     Messages.InformationMessage("Cannot update");
                     Clear();
                     txtCounterName.Focus();
                 }
             }
             else
             {
                 Messages.InformationMessage("Counter name already exist");
                 txtCounterName.Focus();
             }
         }
         else
         {
             bllCounter.CounterEditParticularField(infoCounter);
             Messages.UpdatedMessage();
             Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("CT4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #22
0
 /// <summary>
 /// Function to edit the pricelist
 /// </summary>
 public void EditFunction()
 {
     try
     {
         if (txtRate.Text.Trim() == String.Empty)
         {
             Messages.InformationMessage("Enter rate");
             txtRate.Focus();
         }
         else if (Convert.ToDecimal(txtRate.Text) == 0)
         {
             PriceListBll BllPriceList = new PriceListBll();
             BllPriceList.PriceListDelete(deca);
             Messages.UpdatedMessage();
             if (frmPriceListobj != null)
             {
                 this.Close();
             }
         }
         else
         {
             PriceListBll  BllPriceList  = new PriceListBll();
             PriceListInfo infoPriceList = new PriceListInfo();
             infoPriceList.ProductId      = decProductMain;
             infoPriceList.PricelistId    = Convert.ToDecimal(dgvProductGroup.CurrentRow.Cells["dgvtxtPriceListId"].Value.ToString());
             infoPriceList.PricinglevelId = decPricingLevelMain;
             infoPriceList.UnitId         = decUnitId;
             infoPriceList.BatchId        = decBatchId;
             infoPriceList.Rate           = Convert.ToDecimal(txtRate.Text);
             infoPriceList.Extra1         = string.Empty;
             infoPriceList.Extra2         = string.Empty;
             BllPriceList.PriceListEdit(infoPriceList);
             Messages.UpdatedMessage();
             Clear();
             if (frmPriceListobj != null)
             {
                 this.Close();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PLP3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #23
0
 /// <summary>
 /// Function to edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         CounterInfo infoCounter = new CounterInfo();
         CounterSP   spCounter   = new CounterSP();
         infoCounter.CounterName = txtCounterName.Text.Trim();
         infoCounter.Narration   = txtNarration.Text.Trim();
         infoCounter.Extra1      = string.Empty;
         infoCounter.Extra2      = string.Empty;
         infoCounter.CounterId   = Convert.ToDecimal(dgvCounter.CurrentRow.Cells["dgvtxtcounterId"].Value.ToString());
         if (txtCounterName.Text.ToString() != strCounterName)
         {
             if (spCounter.CounterCheckIfExist(txtCounterName.Text.Trim(), decCounterId) == false)
             {
                 if (spCounter.CounterEditParticularField(infoCounter))
                 {
                     Messages.UpdatedMessage();
                     Clear();
                 }
                 else if (infoCounter.CounterId == 1)
                 {
                     Messages.InformationMessage("Cannot update");
                     Clear();
                     txtCounterName.Focus();
                 }
             }
             else
             {
                 Messages.InformationMessage("Counter name already exist");
                 txtCounterName.Focus();
             }
         }
         else
         {
             spCounter.CounterEditParticularField(infoCounter);
             Messages.UpdatedMessage();
             Clear();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "CT4" + ex.Message;
     }
 }
Пример #24
0
 /// <summary>
 /// Function for Edit
 /// </summary>
 private void EditFunction()
 {
     try
     {
         DesignationInfo infoDesignation = new DesignationInfo();
         DesignationSP   spDesignation   = new DesignationSP();
         if (txtAdvanceAmount.Text == string.Empty)
         {
             infoDesignation.AdvanceAmount = 0;
         }
         else
         {
             infoDesignation.AdvanceAmount = Convert.ToDecimal(txtAdvanceAmount.Text.Trim());
         }
         infoDesignation.DesignationName = txtDesignationName.Text.TrimEnd();
         if (txtCLInMonth.Text == string.Empty)
         {
             infoDesignation.LeaveDays = 0;
         }
         else
         {
             infoDesignation.LeaveDays = Convert.ToDecimal(txtCLInMonth.Text.Trim());
         }
         infoDesignation.Narration = txtNarration.Text.Trim();
         infoDesignation.Extra1    = string.Empty;
         infoDesignation.Extra2    = string.Empty;
         infoDesignation.ExtraDate = DateTime.Now;
         if (CheckExistanceOfDesignation(txtDesignationName.Text.Trim(), decDesignationId) == false)
         {
             infoDesignation.DesignationId = decDesignationId;
             if (spDesignation.DesignationEdit(infoDesignation))
             {
                 Messages.UpdatedMessage();
             }
         }
         else
         {
             Messages.InformationMessage("Designation already exist");
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "D9:" + ex.Message;
     }
 }
Пример #25
0
 /// <summary>
 /// Function to edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         ModelNoSP   spModelNo   = new ModelNoSP();
         ModelNoInfo infoModelNo = new ModelNoInfo();
         infoModelNo.ModelNo   = txtModalNo.Text.Trim();
         infoModelNo.Narration = txtNarration.Text.Trim();
         infoModelNo.Extra1    = string.Empty;
         infoModelNo.Extra2    = string.Empty;
         infoModelNo.ModelNoId = Convert.ToDecimal(dgvModalNo.CurrentRow.Cells[1].Value.ToString());
         if (txtModalNo.Text != strModelNo)
         {
             if (spModelNo.ModelCheckIfExist(txtModalNo.Text.Trim(), decModelNo) == false)
             {
                 if (spModelNo.ModelNoEditParticularFeilds(infoModelNo))
                 {
                     Messages.UpdatedMessage();
                     Clear();
                 }
                 else if (infoModelNo.ModelNoId == 1)
                 {
                     Messages.InformationMessage("Cannot update");
                     Clear();
                     txtModalNo.Focus();
                 }
             }
             else
             {
                 Messages.InformationMessage("Model number already exist");
                 txtModalNo.Focus();
             }
         }
         else
         {
             spModelNo.ModelNoEditParticularFeilds(infoModelNo);
             Messages.UpdatedMessage();
             Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MN4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #26
0
 /// <summary>
 /// Update Function
 /// </summary>
 public void EditFunction()
 {
     try
     {
         UserInfo infoUser = new UserInfo();
         UserSP   spUser   = new UserSP();
         infoUser.UserId   = Convert.ToDecimal(dgvUserCreation.CurrentRow.Cells["dgvtxtUserId"].Value);
         infoUser.UserName = txtUserName.Text.Trim();
         infoUser.Password = txtPassword.Text.Trim();
         if (cbxActive.Checked)
         {
             infoUser.Active = true;
         }
         else
         {
             infoUser.Active = false;
         }
         infoUser.RoleId    = Convert.ToDecimal(cmbRole.SelectedValue);
         infoUser.Narration = txtNarration.Text.Trim();
         infoUser.Extra1    = string.Empty;
         infoUser.Extra2    = string.Empty;
         string strUserName = txtUserName.Text.Trim();
         if (spUser.UserCreationCheckExistence(decUserId, strUserName) == false)
         {
             spUser.UserEdit(infoUser);
             Messages.UpdatedMessage();
             ClearFunction();
             GridFill();
             txtUserName.Focus();
         }
         else
         {
             Messages.InformationMessage("User name already exists");
             txtUserName.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("UC:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #27
0
 /// <summary>
 /// Function to edit a salesman
 /// </summary>
 public void EditFunction()
 {
     try
     {
         EmployeeInfo InfoEmployee = new EmployeeInfo();
         EmployeeSP   SpEmployee   = new EmployeeSP();
         InfoEmployee.EmployeeId   = decSalesManId;
         InfoEmployee.EmployeeCode = txtSalesmanCode.Text.Trim();
         InfoEmployee.EmployeeName = txtName.Text.Trim();
         InfoEmployee.Email        = txtEmail.Text.Trim();
         InfoEmployee.PhoneNumber  = txtPhone.Text.Trim();
         InfoEmployee.MobileNumber = txtMobile.Text.Trim();
         InfoEmployee.Address      = txtAddress.Text.Trim();
         InfoEmployee.Narration    = txtNarration.Text.Trim();
         if (cbxActive.Checked)
         {
             InfoEmployee.IsActive = true;
         }
         else
         {
             InfoEmployee.IsActive = false;
         }
         if (SpEmployee.EmployeeCodeCheckExistance(txtSalesmanCode.Text.Trim().ToString(), decSalesManId) == false)
         {
             SpEmployee.SalesmanEdit(InfoEmployee);
             Messages.UpdatedMessage();
             ClearSearch();
             Clear();
             Gridfill();
         }
         else
         {
             Messages.InformationMessage("Salesman code already exist");
             txtSalesmanCode.Focus();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "S6" + ex.Message;
     }
 }
Пример #28
0
 /// <summary>
 /// Function to Edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         GodownInfo infoGodown = new GodownInfo();
         GodownBll  BllGodown  = new GodownBll();
         infoGodown.GodownName = txtGodownName.Text.Trim();
         infoGodown.Narration  = txtNarration.Text.Trim();
         infoGodown.Extra1     = string.Empty;
         infoGodown.Extra2     = string.Empty;
         infoGodown.GodownId   = Convert.ToDecimal(dgvGodown.CurrentRow.Cells["dgvtxtGodownId"].Value.ToString());
         if (txtGodownName.Text != strGodownName)
         {
             if (BllGodown.GodownCheckIfExist(txtGodownName.Text.Trim(), decGodownId) == false)
             {
                 if (BllGodown.GodownEditParticularField(infoGodown))
                 {
                     Messages.UpdatedMessage();
                     Clear();
                 }
             }
             else
             {
                 Messages.InformationMessage("Godown name already exist");
                 txtGodownName.Focus();
             }
         }
         else
         {
             BllGodown.GodownEditParticularField(infoGodown);
             Messages.UpdatedMessage();
             Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("G5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to edit a service category
 /// </summary>
 public void EditFunction()
 {
     try
     {
         ServiceCategoryInfo infoServiceCategory = new ServiceCategoryInfo();
         ServiceCategorySP   spServiceCategory   = new ServiceCategorySP();
         infoServiceCategory.CategoryName      = txtServiceCategory.Text.Trim();
         infoServiceCategory.Narration         = txtNarration.Text.Trim();
         infoServiceCategory.Extra1            = string.Empty;
         infoServiceCategory.Extra2            = string.Empty;
         infoServiceCategory.ServicecategoryId = Convert.ToDecimal(dgvServiceCategory.CurrentRow.Cells["dgvtxtservicecategoryId"].Value.ToString());
         if (txtServiceCategory.Text.ToString() != strCategoryName)
         {
             if (spServiceCategory.ServiceCategoryCheckIfExist(txtServiceCategory.Text.Trim().ToString(), 0) == false)
             {
                 if (spServiceCategory.ServiceCategoryEditParticularFeilds(infoServiceCategory))
                 {
                     Messages.UpdatedMessage();
                     Clear();
                 }
             }
             else
             {
                 Messages.InformationMessage("Service category name already exist");
                 txtServiceCategory.Focus();
             }
         }
         else
         {
             spServiceCategory.ServiceCategoryEditParticularFeilds(infoServiceCategory);
             Messages.UpdatedMessage();
             Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SC4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #30
0
 /// <summary>
 /// Function to Edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         SiteInfo infoSites = new SiteInfo();
         SiteSP   spSites   = new SiteSP();
         infoSites.SiteName = txtSiteName.Text.Trim();
         infoSites.Address  = txtAddress.Text.Trim();
         infoSites.managed  = chkManaged.Checked;
         infoSites.dflt     = chkDflt.Checked;
         infoSites.SiteId   = Convert.ToDecimal(dgvSites.CurrentRow.Cells["dgvtxtSiteId"].Value.ToString());
         if (txtSiteName.Text != strSiteName)
         {
             if (spSites.SiteCheckIfExist(txtSiteName.Text.Trim(), infoSites.SiteId) == false)
             {
                 if (spSites.SiteEditParticularField(infoSites))
                 {
                     Messages.UpdatedMessage();
                     Clear();
                 }
             }
             else
             {
                 Messages.InformationMessage("Site name already exist");
                 txtSiteName.Focus();
             }
         }
         else
         {
             spSites.SiteEditParticularField(infoSites);
             Messages.UpdatedMessage();
             Clear();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "G5:" + ex.Message;
     }
 }