/// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         DataTable dtblMaterialReceiptRegister           = new DataTable();
         MaterialReceiptMasterSP spMaterialReceiptMaster = new MaterialReceiptMasterSP();
         if (txtMaterialReceiptNo.Text.Trim() == string.Empty)
         {
             strInvoiceNo = string.Empty;
         }
         else
         {
             strInvoiceNo = txtMaterialReceiptNo.Text;
         }
         if (cmbCashOrParty.SelectedIndex == 0 || cmbCashOrParty.SelectedIndex == -1)
         {
             decLedgerId = -1;
         }
         else
         {
             decLedgerId = Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString());
         }
         DateTime FromDate = this.dtpFromDate.Value;
         DateTime ToDate   = this.dtpToDate.Value;
         dtblMaterialReceiptRegister           = spMaterialReceiptMaster.MaterialReceiptMasterViewAll(strInvoiceNo, decLedgerId, FromDate, ToDate);
         dgvMaterialReceiptRegister.DataSource = dtblMaterialReceiptRegister;
     }
     catch (Exception ex)
     {
         MessageBox.Show("MRREG1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Function to fill MaterialReceipt combobox
 /// </summary>
 public void MaterialReceiptComboFill()
 {
     try
     {
         MaterialReceiptMasterSP spMaterialReceiptMaster = new MaterialReceiptMasterSP();
         cmbMaterialReceiptNo.DataSource    = spMaterialReceiptMaster.MaterialReceiptNoCorrespondingToLedgerForReport(Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()));
         cmbMaterialReceiptNo.DisplayMember = "invoiceNo";
         cmbMaterialReceiptNo.ValueMember   = "materialReceiptMasterId";
         cmbMaterialReceiptNo.SelectedIndex = -1;
     }
     catch (Exception ex)
     {
         MessageBox.Show("ROREP06:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Print button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvMaterialReceiptReport.RowCount > 0)
         {
             MaterialReceiptMasterSP spMaterialReceiptMaster = new MaterialReceiptMasterSP();
             DataSet dsMaterialReceiptReport = spMaterialReceiptMaster.MaterialReceiptReportPrinting(1, strInvoiceNo, strStatus, decLedgerId, strproductCode, decVoucherTypeId, this.dtpFromDate.Value, this.dtpToDate.Value, decOrderId);
             ////frmReport //frmReport = new frmReport();
             //frmReport.MdiParent = formMDI.MDIObj;
             //    frmreport.MaterialReceiptReportPrinting(dsMaterialReceiptReport);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MRR15:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 ///  Function to fill OrderNo combobox
 /// </summary>
 /// <param name="decLedger"></param>
 public void OrderNoComboFill(decimal decLedger)
 {
     try
     {
         DataTable dtbl = new DataTable();
         MaterialReceiptMasterSP spMaterialReceiptMaster = new MaterialReceiptMasterSP();
         dtbl = spMaterialReceiptMaster.GetOrderNoCorrespondingtoLedgerForMaterialReceiptRpt(Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()));
         DataRow drow = dtbl.NewRow();
         drow["invoiceNo"]             = "All";
         drow["purchaseOrderMasterId"] = -1;
         dtbl.Rows.InsertAt(drow, 0);
         if (dtbl != null)
         {
             cmbOrderNo.DataSource    = dtbl;
             cmbOrderNo.DisplayMember = "invoiceNo";
             cmbOrderNo.ValueMember   = "purchaseOrderMasterId";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MRR4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Function to fill the grid based on the search condition
 /// </summary>
 public void GridFill()
 {
     try
     {
         DataTable dtblMaterialReceiptRegister           = new DataTable();
         MaterialReceiptMasterSP spMaterialReceiptMaster = new MaterialReceiptMasterSP();
         if (cmbOrderNo.SelectedIndex == 0 || cmbOrderNo.SelectedIndex == -1)
         {
             decOrderId = -1;
         }
         else
         {
             decOrderId = Convert.ToDecimal(cmbOrderNo.SelectedValue.ToString());
         }
         if (txtVoucherNo.Text.Trim() == string.Empty)
         {
             strInvoiceNo = string.Empty;
         }
         else
         {
             strInvoiceNo = txtVoucherNo.Text;
         }
         if (cmbCashOrParty.SelectedIndex == 0 || cmbCashOrParty.SelectedIndex == -1)
         {
             decLedgerId = -1;
         }
         else
         {
             decLedgerId = Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString());
         }
         if (cmbVoucherType.SelectedIndex == 0 || cmbVoucherType.SelectedIndex == -1)
         {
             decVoucherTypeId = -1;
         }
         else
         {
             decVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
         }
         if (txtProductCode.Text.Trim() == string.Empty)
         {
             strproductCode = string.Empty;
         }
         else
         {
             strproductCode = txtProductCode.Text;
         }
         if (cmbStatus.SelectedIndex == 0 || cmbStatus.SelectedIndex == -1)
         {
             strStatus = "All";
         }
         else
         {
             strStatus = cmbStatus.SelectedItem.ToString();
         }
         DateTime FromDate = this.dtpFromDate.Value;
         DateTime ToDate   = this.dtpToDate.Value;
         dtblMaterialReceiptRegister         = spMaterialReceiptMaster.MaterialReceiptReportViewAll(decOrderId, strInvoiceNo, decLedgerId, decVoucherTypeId, strproductCode, FromDate, ToDate, strStatus);
         dgvMaterialReceiptReport.DataSource = dtblMaterialReceiptRegister;
     }
     catch (Exception ex)
     {
         MessageBox.Show("MRR5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }