protected void ibSubmitOther_Click(object sender, ImageClickEventArgs e)
    {
        DateTime dt;
        try
        {
            dt = DateTime.ParseExact(txtOtherDate.Text.Trim(), "M/d/yyyy", System.Globalization.CultureInfo.InvariantCulture);
        }
        catch
        {
            Mess("Wrong Date: MM/DD/YYYY");
            return;
        }
        string sDt = String.Format("{0:yyyy}-{0:MM}-{0:dd}", dt);

        string trnDate = sDt;
        string des = txtOthercDescr.Text;
        string amunt = txtOtherAmount.Text;

        string clientName = null;
        string rate = null;
        int no_of_hours = 0;
        string FromDate = null;
        string ToDate = null;
        string vat = null;
        string serTax = null;
        int expenseType = 0;
        string amtBefTax = null;
        string modeOfPay = null;
        string empName = null;
        string profTax = null;
        string tds = null;
        string pf = null;
        string esi = null;
        string houseRentAlw = null;
        string convyAlw = null;
        string medicalAlw = null;
        string splAlw = null;
        string basicSal = null;
        string accNo = null;
        string party = null;
        string paymentType = null;
        string invNo = null;
        string cheqNo = null;
        decimal no_of_kms = 0;
        string rate_per_km = null;
        string chequeDate = null;

        Service ws = new Service();
        Response result;
        result = ws.CreateTransaction(9, 1, clientName, no_of_hours, rate, FromDate, ToDate, trnDate, vat, serTax, amunt, expenseType, des, amtBefTax, modeOfPay, empName, profTax, tds, pf, esi, houseRentAlw, convyAlw, medicalAlw, splAlw, basicSal, accNo, party, paymentType, invNo, cheqNo, no_of_kms, rate_per_km, account, chequeDate);
        if (!result.isSuccess)
        {
            Mess(result.errorMessage);
            return;
        }
        Response.Redirect("Client.aspx");
    }
    protected void ibSubmitSal_Click(object sender, ImageClickEventArgs e)
    {
        DateTime dt;
            try
            {
                dt = DateTime.ParseExact(txtDate.Text.Trim(), "M/d/yyyy", System.Globalization.CultureInfo.InvariantCulture);
            }
            catch
            {
                Mess("Wrong Date: MM/DD/YYYY");
                return;
            }
            string sDt = String.Format("{0:yyyy}-{0:MM}-{0:dd}", dt);

            /*Salary sal = new Salary();
            sal.EmpName = txtEmpName.Text.Trim();
            sal.Gross = Convert.ToSingle(txtGross.Text);
            sal.CPP = Convert.ToSingle(txtCpp.Text);
            sal.EI = Convert.ToSingle(txtEI.Text);
            sal.Net = Convert.ToSingle(txtNet.Text);
            string transXml = bl<Salary>.convertToXml(sal);*/

            string trnDate = sDt;
            string empName = txtEmpName.Text;
            string basicSal = txtBasicSal.Text;
            string houseRentAlw = txtHouseRent.Text;
            string convyAlw = txtCoveyance.Text;
            string medicalAlw = txtMedical.Text;
            string splAlw = txtSpecial.Text;
            string profTax = txtPF.Text;
            string tds = txtTDS.Text;
            string pf = txtPF.Text;
            string esi = txtESI.Text;
            string amunt = txtAmnt.Text;

            string clientName = null;
            int no_of_hours = 0;
            string rate = null; ;
            string FromDate = null;
            string ToDate = null;
            string vat = null;
            string serTax = null;
            int expenseType = 0;
            string des = null;
            string amtBefTax = null;
            string modeOfPay = null;
            string accNo = null;
            string party = null;
            string paymentType = null;
            string invNo = null;
            string cheqNo = null;
            decimal no_of_kms = 0;
            string rate_per_km = null;
            string chequeDate = null;

            Service ws = new Service();
            Response result;
            result = ws.CreateTransaction(4, 1, clientName, no_of_hours, rate, FromDate, ToDate, trnDate, vat, serTax, amunt, expenseType, des, amtBefTax, modeOfPay, empName, profTax, tds, pf, esi, houseRentAlw, convyAlw, medicalAlw, splAlw, basicSal, accNo, party, paymentType, invNo, cheqNo, no_of_kms, rate_per_km, account, chequeDate);
            if (!result.isSuccess)
            {
                Mess(result.errorMessage);
                return;
            }
            Response.Redirect("Client.aspx");
    }
    protected void ibSubmit_Click(object sender, ImageClickEventArgs e)
    {
        DateTime dt;
            try
            {
                dt = DateTime.ParseExact(txtInvDate.Text.Trim(), "M/d/yyyy", System.Globalization.CultureInfo.InvariantCulture);
            }
            catch
            {
                Mess("Wrong Date: MM/DD/YYYY");
                return;
            }
            string sDt = String.Format("{0:yyyy}-{0:MM}-{0:dd}", dt);

            DateTime startDate;
            DateTime endDate;
            try
            {
                startDate = DateTime.ParseExact(txtFrom.Text.Trim(), "M/d/yyyy", System.Globalization.CultureInfo.InvariantCulture);
            }
            catch
            {
                Mess("Wrong From Date: MM/DD/YYYY");
                return;
            }
            try
            {
                endDate = DateTime.ParseExact(txtTo.Text.Trim(), "M/d/yyyy", System.Globalization.CultureInfo.InvariantCulture);
            }
            catch
            {
                Mess("Wrong To Date: MM/DD/YYYY");
                return;
            }

            if (startDate > endDate)
            {
                Mess("From Date is greater than To Date");
                return;
            }

            string sDate = String.Format("{0:yyyy}-{0:MM}-{0:dd}", startDate);
            string eDate = String.Format("{0:yyyy}-{0:MM}-{0:dd}", endDate);

           /* Invoice invoice = new Invoice();
            invoice.ClientName = txtClientName.Text.Trim();
            invoice.NumberOfHours = Convert.ToSingle(txtNumberHours.Text);
            invoice.Rate = Convert.ToSingle(txtRate.Text);
            invoice.DateFrom = sDate;
            invoice.DateTo = eDate;
            string transXml = bl<Invoice>.convertToXml(invoice); */

            string trnDate = sDt;
            string clientName = txtClientName.Text;
            int no_of_hours = Util.ToInt32(txtNumberHours.Text);
            string rate = txtRate.Text;
            string FromDate = sDate;
            string ToDate = eDate;
            string vat = txtVat.Text;
            string serTax = txtServiceTax.Text;
            string amunt = txtTotal.Text;

            int expenseType = 0;
            string des = null;
            string amtBefTax = null;
            string modeOfPay = null;
            string empName = null;
            string profTax = null;
            string tds = null;
            string pf = null;
            string esi = null;
            string houseRentAlw = null;
            string convyAlw = null;
            string medicalAlw = null;
            string splAlw = null;
            string basicSal = null;
            string accNo = null;
            string party = null;
            string paymentType = null;
            string invNo = null;
            string cheqNo = null;
            decimal no_of_kms = 0;
            string rate_per_km = null;
            string chequeDate = null;

            Service ws = new Service();
            Response result;
            result = ws.CreateTransaction(1, 1, clientName, no_of_hours, rate,  FromDate, ToDate, trnDate, vat, serTax, amunt, expenseType, des, amtBefTax, modeOfPay, empName, profTax, tds, pf, esi, houseRentAlw, convyAlw, medicalAlw, splAlw, basicSal, accNo, party, paymentType, invNo, cheqNo, no_of_kms, rate_per_km, account, chequeDate);
            if (!result.isSuccess)
            {
                Mess(result.errorMessage);
                return;
            }
            Response.Redirect("Client.aspx");
    }
    protected void ibSubmitExp_Click(object sender, ImageClickEventArgs e)
    {
        DateTime dt;
            try
            {
                dt = DateTime.ParseExact(txtDate.Text.Trim(), "M/d/yyyy", System.Globalization.CultureInfo.InvariantCulture);
            }
            catch
            {
                Mess("Wrong Date: MM/DD/YYYY");
                return;
            }
            string sDt = String.Format("{0:yyyy}-{0:MM}-{0:dd}", dt);

            /*Expenses exp = new Expenses();
            exp.ExpType = ddlType.SelectedValue;
            exp.ExpDate = sDt;
            exp.Description = txtDescription.Text;
            exp.Amount = Convert.ToSingle(txtAmount.Text);
            string transXml = bl<Expenses>.convertToXml(exp);*/

            string trnDate = sDt;
            string clientName = txtNameOfPayee.Text;
            int expenseType = Util.ToInt32(ddlType.SelectedValue);
            string amtBefTax = txtAmntBeforeTax.Text;
            string vat = txtVat.Text;
            string serTax = txtServiceTax.Text;
            string modeOfPay = ddlModeOfPayment.SelectedValue;
            string chequeDate = cheqDate.Text;
            string des = txtDescription.Text;
            string cheqNo = txtCheqNo.Text;
            string amunt = txtAmount.Text;

            int no_of_hours = 0;
            string rate = null;
            string FromDate = null;
            string ToDate = null;
            string empName = null;
            string profTax = null;
            string tds = null;
            string pf = null;
            string esi = null;
            string houseRentAlw = null;
            string convyAlw = null;
            string medicalAlw = null;
            string splAlw = null;
            string basicSal = null;
            string accNo = null;
            string party = null;
            string paymentType = null;
            string invNo = null;
            decimal no_of_kms = 0;
            string rate_per_km = null;

            Service ws = new Service();
            Response result;
            result = ws.CreateTransaction(2, 1, clientName, no_of_hours, rate, FromDate, ToDate, trnDate, vat, serTax, amunt, expenseType, des, amtBefTax, modeOfPay, empName, profTax, tds, pf, esi, houseRentAlw, convyAlw, medicalAlw, splAlw, basicSal, accNo, party, paymentType, invNo, cheqNo, no_of_kms, rate_per_km, account, chequeDate);
            if (!result.isSuccess)
            {
                Mess(result.errorMessage);
                return;
            }
            Response.Redirect("Client.aspx");
    }
    protected void ibSubmitBank_Click(object sender, ImageClickEventArgs e)
    {
        DateTime dt;
            try
            {
                dt = DateTime.ParseExact(txtBankDate.Text.Trim(), "M/d/yyyy", System.Globalization.CultureInfo.InvariantCulture);
            }
            catch
            {
                Mess("Wrong Date: MM/DD/YYYY");
                return;
            }
            string sDt = String.Format("{0:yyyy}-{0:MM}-{0:dd}", dt);

            /*BankTransaction bt = new BankTransaction();
            bt.BankDate = sDt;
            bt.Rate = Convert.ToSingle(txtBankRate.Text.Trim());
            bt.CreditDebit = rbCreditDebit.SelectedItem.Text;
            bt.Description = txtBankDescr.Text;
            bt.Amount = Convert.ToSingle(txtBankAmount.Text);
            string transXml = bl<BankTransaction>.convertToXml(bt);*/

            string trnDate = sDt;
            string accNo = txtAccNo.Text;
            string party = txtParty.Text;
            string paymentType = drpPaymentType.SelectedValue;
            string chequeDate = cheqDate.Text;
            string cheqNo = cheqNumber.Text;
            string des = txtBankDescr.Text;
            string amunt = txtBankAmount.Text;

            string clientName = null;
            int no_of_hours = 0;
            string rate = null;
            string FromDate = null;
            string ToDate = null;
            string vat = null;
            string serTax = null;
            int expenseType = 0;
            string amtBefTax = null;
            string modeOfPay = null;
            string empName = null;
            string profTax = null;
            string tds = null;
            string pf = null;
            string esi = null;
            string houseRentAlw = null;
            string convyAlw = null;
            string medicalAlw = null;
            string splAlw = null;
            string basicSal = null;
            string invNo = null;
            decimal no_of_kms = 0;
            string rate_per_km = null;

            Service ws = new Service();
            Response result;

            result = ws.CreateTransaction(5, 1, clientName, no_of_hours, rate, FromDate, ToDate, trnDate, vat, serTax, amunt, expenseType, des, amtBefTax, modeOfPay, empName, profTax, tds, pf, esi, houseRentAlw, convyAlw, medicalAlw, splAlw, basicSal, accNo, party, paymentType, invNo, cheqNo, no_of_kms, rate_per_km, account, chequeDate);
            if (!result.isSuccess)
            {
                Mess(result.errorMessage);
                return;
            }
            Response.Redirect("Client.aspx");
    }