Exemplo n.º 1
0
 /// <summary>
 /// Function to check the voucher type and fill the corresponding vouchertype in VoucherType combobox
 /// </summary>
 /// <param name="strVoucherType"></param>
 public void CallFromVoucherMenu(string strVoucherType)
 {
     try
     {
         if (formMDI.strVouchertype == "POS")
         {
             VoucherType = "POS";
         }
         else
         {
             VoucherType = strVoucherType;
         }
         VoucherTypeSP spVoucherType   = new VoucherTypeSP();
         DataTable     dtblVouchetType = new DataTable();
         dtblVouchetType = spVoucherType.VoucherTypeSelectionComboFill(strVoucherType);
         int inCount = dtblVouchetType.Rows.Count;
         cmbVoucherType.DataSource    = dtblVouchetType;
         cmbVoucherType.ValueMember   = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = -1;
         if (inCount == 1)
         {
             cmbVoucherType.SelectedValue = dtblVouchetType.Rows[0].ItemArray[0].ToString();
             btnGo_Click(btnGo, EventArgs.Empty);
         }
         else
         {
             base.Show();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "VTS1:" + ex.Message;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Function to fill VoucherType combobox
 /// </summary>
 public void VoucherTypeComboFill()
 {
     try
     {
         DataTable dtblVoucher = new DataTable();
         dtblVoucher = spVoucherType.VoucherTypeSelectionComboFill("Delivery Note");
         cmbVoucherType.DataSource = dtblVoucher;
         DataRow drawselect = dtblVoucher.NewRow();
         drawselect["voucherTypeId"]   = 0;
         drawselect["voucherTypeName"] = "All";
         dtblVoucher.Rows.InsertAt(drawselect, 0);
         cmbVoucherType.ValueMember   = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "DNREP1:" + ex.Message;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Function to fill VoucherType combobox
 /// </summary>
 public void VoucherTypeComboFill()
 {
     try
     {
         VoucherTypeSP spVoucherType   = new VoucherTypeSP();
         DataTable     dtblVouchetType = new DataTable();
         dtblVouchetType = spVoucherType.VoucherTypeSelectionComboFill("Contra Voucher");
         DataRow dr = dtblVouchetType.NewRow();
         dr[1] = "ALL";
         dtblVouchetType.Rows.InsertAt(dr, 0);
         cmbVoucherType.DataSource    = dtblVouchetType;
         cmbVoucherType.ValueMember   = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "CRT2:" + ex.Message;
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Function to fill VoucherType combobox
        /// </summary>
        public void VoucherTypeComboFill()
        {
            VoucherTypeSP spVoucherType = new VoucherTypeSP();
            DataTable     dtbl          = new DataTable();

            try
            {
                dtbl = spVoucherType.VoucherTypeSelectionComboFill("Purchase Invoice");
                DataRow drow = dtbl.NewRow();
                drow["voucherTypeId"]   = 0;
                drow["voucherTypeName"] = "All";
                dtbl.Rows.InsertAt(drow, 0);
                cmbVoucherType.DataSource    = dtbl;
                cmbVoucherType.ValueMember   = "voucherTypeId";
                cmbVoucherType.DisplayMember = "voucherTypeName";
            }
            catch (Exception ex)
            {
                formMDI.infoError.ErrorString = "PIREG2:" + ex.Message;
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Function to fill VoucherType combobox
 /// </summary>
 public void VoucherTypeComboFill()
 {
     try
     {
         DataTable     dtblVoucherTypes = new DataTable();
         VoucherTypeSP spVoucherType    = new VoucherTypeSP();
         dtblVoucherTypes = spVoucherType.VoucherTypeSelectionComboFill("Service Voucher");
         DataRow dr = dtblVoucherTypes.NewRow();
         dr["voucherTypeId"]   = 0;
         dr["voucherTypeName"] = "All";
         dtblVoucherTypes.Rows.InsertAt(dr, 0);
         cmbVoucherType.DataSource    = dtblVoucherTypes;
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.ValueMember   = "voucherTypeId";
         cmbVoucherType.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SVRT6:" + ex.Message;
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Function to fill VoucherType combobox
 /// </summary>
 public void VoucherTypeFill()
 {
     try
     {
         VoucherTypeSP spVoucherType = new VoucherTypeSP();
         DataTable     dtbl          = new DataTable();
         dtbl = spVoucherType.VoucherTypeSelectionComboFill("Physical Stock");
         DataRow dr = dtbl.NewRow();
         dr[0] = 0;
         dr[1] = "All";
         dtbl.Rows.InsertAt(dr, 0);
         cmbVoucherType.DataSource    = dtbl;
         cmbVoucherType.ValueMember   = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PSRT5:" + ex.Message;
     }
 }