コード例 #1
0
 public List<DataTable> MonthlySalaryVoucherMasterAddWithIdentity(SalaryVoucherMasterInfo salaryvouchermasterinfo, bool IsAutomatic)
 {
     List<DataTable> list = new List<DataTable>();
        try
        {
        SPSalaryVoucherMaster.MonthlySalaryVoucherMasterAddWithIdentity(salaryvouchermasterinfo, IsAutomatic);
        }
        catch (Exception ex)
        {
        MessageBox.Show("BR6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        return list;
 }
コード例 #2
0
 /// <summary>
 /// Function to get particular values from SalaryVoucherMaster Table based on the parameter
 /// </summary>
 /// <param name="salaryVoucherMasterId"></param>
 /// <returns></returns>
 public SalaryVoucherMasterInfo SalaryVoucherMasterView(decimal salaryVoucherMasterId)
 {
     SalaryVoucherMasterInfo salaryvouchermasterinfo = new SalaryVoucherMasterInfo();
     SqlDataReader sdrreader = null;
     try
     {
         if (sqlcon.State == ConnectionState.Closed)
         {
             sqlcon.Open();
         }
         SqlCommand sccmd = new SqlCommand("SalaryVoucherMasterView", sqlcon);
         sccmd.CommandType = CommandType.StoredProcedure;
         SqlParameter sprmparam = new SqlParameter();
         sprmparam = sccmd.Parameters.Add("@salaryVoucherMasterId", SqlDbType.Decimal);
         sprmparam.Value = salaryVoucherMasterId;
         sdrreader = sccmd.ExecuteReader();
         while (sdrreader.Read())
         {
             salaryvouchermasterinfo.SalaryVoucherMasterId = decimal.Parse(sdrreader[0].ToString());
             salaryvouchermasterinfo.LedgerId = decimal.Parse(sdrreader[1].ToString());
             salaryvouchermasterinfo.VoucherNo = sdrreader[2].ToString();
             salaryvouchermasterinfo.InvoiceNo = sdrreader[3].ToString();
             salaryvouchermasterinfo.Date = DateTime.Parse(sdrreader[4].ToString());
             salaryvouchermasterinfo.Month = DateTime.Parse(sdrreader[5].ToString());
             salaryvouchermasterinfo.TotalAmount = decimal.Parse(sdrreader[6].ToString());
             salaryvouchermasterinfo.Narration = sdrreader[7].ToString();
             salaryvouchermasterinfo.ExtraDate = DateTime.Parse(sdrreader[8].ToString());
             salaryvouchermasterinfo.Extra1 = sdrreader[9].ToString();
             salaryvouchermasterinfo.Extra2 = sdrreader[10].ToString();
             salaryvouchermasterinfo.SuffixPrefixId = decimal.Parse(sdrreader[11].ToString());
             salaryvouchermasterinfo.VoucherTypeId = decimal.Parse(sdrreader[12].ToString());
             salaryvouchermasterinfo.FinancialYearId = decimal.Parse(sdrreader[13].ToString());
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
     finally
     {
         sdrreader.Close();
         sqlcon.Close();
     }
     return salaryvouchermasterinfo;
 }
コード例 #3
0
 /// <summary>
 /// Function to Update values in SalaryVoucherMaster Table
 /// </summary>
 /// <param name="salaryvouchermasterinfo"></param>
 public void SalaryVoucherMasterEdit(SalaryVoucherMasterInfo salaryvouchermasterinfo)
 {
     try
     {
         if (sqlcon.State == ConnectionState.Closed)
         {
             sqlcon.Open();
         }
         SqlCommand sccmd = new SqlCommand("SalaryVoucherMasterEdit", sqlcon);
         sccmd.CommandType = CommandType.StoredProcedure;
         SqlParameter sprmparam = new SqlParameter();
         sprmparam = sccmd.Parameters.Add("@salaryVoucherMasterId", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.SalaryVoucherMasterId;
         sprmparam = sccmd.Parameters.Add("@ledgerId", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.LedgerId;
         sprmparam = sccmd.Parameters.Add("@voucherNo", SqlDbType.VarChar);
         sprmparam.Value = salaryvouchermasterinfo.VoucherNo;
         sprmparam = sccmd.Parameters.Add("@invoiceNo", SqlDbType.VarChar);
         sprmparam.Value = salaryvouchermasterinfo.InvoiceNo;
         sprmparam = sccmd.Parameters.Add("@date", SqlDbType.DateTime);
         sprmparam.Value = salaryvouchermasterinfo.Date;
         sprmparam = sccmd.Parameters.Add("@month", SqlDbType.DateTime);
         sprmparam.Value = salaryvouchermasterinfo.Month;
         sprmparam = sccmd.Parameters.Add("@totalAmount", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.TotalAmount;
         sprmparam = sccmd.Parameters.Add("@narration", SqlDbType.VarChar);
         sprmparam.Value = salaryvouchermasterinfo.Narration;
         sprmparam = sccmd.Parameters.Add("@extra1", SqlDbType.VarChar);
         sprmparam.Value = salaryvouchermasterinfo.Extra1;
         sprmparam = sccmd.Parameters.Add("@extra2", SqlDbType.VarChar);
         sprmparam.Value = salaryvouchermasterinfo.Extra2;
         sprmparam = sccmd.Parameters.Add("@suffixPrefixId", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.SuffixPrefixId;
         sprmparam = sccmd.Parameters.Add("@voucherTypeId", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.VoucherTypeId;
         sprmparam = sccmd.Parameters.Add("@financialYearId", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.FinancialYearId;
         sccmd.ExecuteNonQuery();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
     finally
     {
         sqlcon.Close();
     }
 }
コード例 #4
0
 /// <summary>
 /// Function to insert values to MonthlySalaryVoucherMaster Table and return the Curresponding row's Id
 /// </summary>
 /// <param name="salaryvouchermasterinfo"></param>
 /// <param name="IsAutomatic"></param>
 /// <returns></returns>
 public List<DataTable> MonthlySalaryVoucherMasterAddWithIdentity(SalaryVoucherMasterInfo salaryvouchermasterinfo, bool IsAutomatic)
 {
     List<DataTable> ListObj = new List<DataTable>();
     DataTable dtbl = new DataTable();
     try
     {
         if (sqlcon.State == ConnectionState.Closed)
         {
             sqlcon.Open();
         }
         SqlDataAdapter sqlda = new SqlDataAdapter("MonthlySalaryVoucherMasterAddWithIdentity", sqlcon);
         sqlda.SelectCommand.CommandType = CommandType.StoredProcedure;
         SqlParameter sprmparam = new SqlParameter();
         sprmparam = sqlda.SelectCommand.Parameters.Add("@ledgerId", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.LedgerId;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@voucherNo", SqlDbType.VarChar);
         sprmparam.Value = salaryvouchermasterinfo.VoucherNo;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@invoiceNo", SqlDbType.VarChar);
         sprmparam.Value = salaryvouchermasterinfo.InvoiceNo;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@date", SqlDbType.DateTime);
         sprmparam.Value = salaryvouchermasterinfo.Date;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@month", SqlDbType.DateTime);
         sprmparam.Value = salaryvouchermasterinfo.Month;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@totalAmount", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.TotalAmount;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@narration", SqlDbType.VarChar);
         sprmparam.Value = salaryvouchermasterinfo.Narration;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@extra1", SqlDbType.VarChar);
         sprmparam.Value = salaryvouchermasterinfo.Extra1;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@extra2", SqlDbType.VarChar);
         sprmparam.Value = salaryvouchermasterinfo.Extra2;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@suffixPrefixId", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.SuffixPrefixId;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@voucherTypeId", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.VoucherTypeId;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@financialYearId", SqlDbType.Decimal);
         sprmparam.Value = salaryvouchermasterinfo.FinancialYearId;
         sprmparam = sqlda.SelectCommand.Parameters.Add("@isAutomatic", SqlDbType.Bit);
         sprmparam.Value = IsAutomatic;
         sqlda.Fill(dtbl);
         ListObj.Add(dtbl);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
     finally
     {
         sqlcon.Close();
     }
     return ListObj;
 }
コード例 #5
0
 public void SalaryVoucherMasterEdit(SalaryVoucherMasterInfo salaryvouchermasterinfo)
 {
     try
        {
        SPSalaryVoucherMaster.SalaryVoucherMasterEdit(salaryvouchermasterinfo);
        }
        catch (Exception ex)
        {
        MessageBox.Show("CN01:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
 }
コード例 #6
0
 public SalaryVoucherMasterInfo SalaryVoucherMasterView(decimal salaryVoucherMasterId)
 {
     SalaryVoucherMasterInfo InfoSalaryVoucherMaster = new SalaryVoucherMasterInfo();
        try
        {
        InfoSalaryVoucherMaster = SPSalaryVoucherMaster.SalaryVoucherMasterView(salaryVoucherMasterId);
        }
        catch (Exception ex)
        {
        MessageBox.Show("CN01:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        return InfoSalaryVoucherMaster;
 }
コード例 #7
0
 public List<DataTable> MonthlySalaryVoucherMasterAddWithIdentity(SalaryVoucherMasterInfo salaryvouchermasterinfo, bool IsAutomatic)
 {
     SalaryVoucherMasterSP SPSalaryVoucherMaster = new SalaryVoucherMasterSP();
     List<DataTable> ListObj = new List<DataTable>();
     try
     {
         ListObj = SPSalaryVoucherMaster.MonthlySalaryVoucherMasterAddWithIdentity(salaryvouchermasterinfo, IsAutomatic);
     }
     catch (Exception ex)
     {
         MessageBox.Show("SvBll 11:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     return ListObj;
 }
コード例 #8
0
        public SalaryVoucherMasterInfo SalaryVoucherMasterView(decimal salaryVoucherMasterId)
        {
            SalaryVoucherMasterInfo salaryvouchermasterinfo = new SalaryVoucherMasterInfo();

            SalaryVoucherMasterSP SPSalaryVoucherMaster = new SalaryVoucherMasterSP();

            try
            {
                salaryvouchermasterinfo = SPSalaryVoucherMaster.SalaryVoucherMasterView(salaryVoucherMasterId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("SvBll 9:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);

            }
            return salaryvouchermasterinfo;
        }