/// <summary>
 /// Function to fill VoucherType combobox
 /// </summary>
 public void VoucherTypeComboFill()
 {
     try
     {
         RejectionOutDetailsSP spRejectionOutDetails = new RejectionOutDetailsSP();
         DataTable             dtbl = new DataTable();
         dtbl = spRejectionOutDetails.VoucherTypeComboFillForRejectionOutReport();
         cmbVoucherType.DataSource    = dtbl;
         cmbVoucherType.ValueMember   = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         MessageBox.Show("ROREP05:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
示例#2
0
 /// <summary>
 /// Function to fill VoucherType combobox
 /// </summary>
 public void VoucherTypeComboFill()
 {
     try
     {
         RejectionOutDetailsSP spRejectionOutDetails = new RejectionOutDetailsSP();
         DataTable             dtbl = new DataTable();
         dtbl = spRejectionOutDetails.VoucherTypeComboFillForRejectionOutReport();
         cmbVoucherType.DataSource    = dtbl;
         cmbVoucherType.ValueMember   = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "ROREP5:" + ex.Message;
     }
 }
 /// <summary>
 /// Function to fill VoucherType combobox
 /// </summary>
 public void VoucherTypeComboFill()
 {
     try
     {
         RejectionOutDetailsSP spRejectionOutDetails = new RejectionOutDetailsSP();
         DataTable dtbl = new DataTable();
         dtbl = spRejectionOutDetails.VoucherTypeComboFillForRejectionOutReport();
         cmbVoucherType.DataSource = dtbl;
         cmbVoucherType.ValueMember = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         MessageBox.Show("ROREP05:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
示例#4
0
 /// <summary>
 /// Funtion to check remaining  quantity with refernce to purchaseinvoice and rejectionout
 /// </summary>
 /// <returns></returns>
 public int QuantityCheckWithReference()
 {
     decimal decQtyRejectionOutAndPurchaseInvoice = 0;
     decimal decQtyMaterialReceipt = 0;
     decimal inRef = 0;
     int inF1 = 1;
     decimal decMaterialReceiptDetailsId = 0;
     MaterialReceiptMasterSP spMaterialReceiptMaster = new MaterialReceiptMasterSP();
     PurchaseDetailsSP spPurchaseDetails = new PurchaseDetailsSP();
     RejectionOutDetailsSP spRejectionOut = new RejectionOutDetailsSP();
     try
     {
         foreach (DataGridViewRow dgvrow in dgvProduct.Rows)
         {
             if (dgvrow.Cells["dgvtxtmaterialReceiptDetailsId"].Value != null)
             {
                 if (dgvrow.Cells["dgvtxtmaterialReceiptDetailsId"].Value.ToString() != "0" || dgvrow.Cells["dgvtxtmaterialReceiptDetailsId"].Value.ToString() != string.Empty)
                 {
                     decMaterialReceiptDetailsId = Convert.ToDecimal(dgvrow.Cells["dgvtxtmaterialReceiptDetailsId"].Value.ToString());
                     inRef = spMaterialReceiptMaster.MaterialReceiptDetailsReferenceCheck(decMaterialReceiptDetailsId);
                     if (inRef == 1)
                     {
                         if (inF1 == 1)
                         {
                             if (dgvrow.Cells["dgvtxtQty"].Value != null)
                             {
                                 if (dgvrow.Cells["dgvtxtQty"].Value.ToString() != "0" || dgvrow.Cells["dgvtxtQty"].Value.ToString() != string.Empty)
                                 {
                                     decQtyMaterialReceipt = Convert.ToDecimal(dgvrow.Cells["dgvtxtQty"].Value.ToString());
                                     decQtyRejectionOutAndPurchaseInvoice = Math.Round(spMaterialReceiptMaster.MaterialReceiptQuantityDetailsAgainstPurcahseInvoiceAndRejectionOut(decMaterialReceiptDetailsId), PublicVariables._inNoOfDecimalPlaces);
                                     if (decQtyMaterialReceipt >= decQtyRejectionOutAndPurchaseInvoice)
                                     {
                                         inF1 = 1;
                                     }
                                     else
                                     {
                                         inF1 = 0;
                                         Messages.InformationMessage("Quantity in row " + (dgvrow.Index + 1) + " should be greater than " + decQtyRejectionOutAndPurchaseInvoice);
                                     }
                                 }
                                 else
                                 {
                                     inF1 = 0;
                                     Messages.InformationMessage("Quantity in row " + (dgvrow.Index + 1) + " should be greater than " + decQtyRejectionOutAndPurchaseInvoice);
                                 }
                             }
                             else
                             {
                                 inF1 = 0;
                                 Messages.InformationMessage("Quantity in row " + (dgvrow.Index + 1) + " should be greater than " + decQtyRejectionOutAndPurchaseInvoice);
                             }
                         }
                     }
                     else
                     {
                         inF1 = 1;
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MR11:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     return inF1;
 }