コード例 #1
0
        protected void btnInsert_Click(object sender, EventArgs e)
        {
            try
            {
                propcash obj = new  propcash();
                obj.Cash_VNo     = txtVocherno.Text;
                obj.cash_date    = Convert.ToDateTime(txtDate.Text);
                obj.cash_name    = txtwhom.Text;
                obj.Cash_purpose = txtpurpose.Text;
                obj.cash_tag     = ddltagpurpose.SelectedItem.Text;
                obj.cash_amount  = Convert.ToInt32(txtAmount.Text);

                int op = BusinessNewPurchase.dalbusfillcash(obj);

                if (op <= 0)
                {
                    Label1.Text = "Successfully inserted";


                    txtVocherno.Text = "";
                    txtDate.Text     = "";
                    txtwhom.Text     = "";
                    txtpurpose.Text  = "";

                    txtAmount.Text = "";
                    ddltagpurpose.SelectedItem.Text = "-Select-";
                }
                else
                {
                    Label1.Text = "Unsuccessful";
                }
            }

            catch
            (Exception ex)
            {
                Label1.Text = ex.Message.ToString();
            }
        }
コード例 #2
0
 public static int dalbusfillcash(propcash objcash)
 {
     return(DalItemPurchase.insertcash(objcash));
 }
コード例 #3
0
 public static int insertcash(propcash objcash)
 {
     return(DBManager.ExecuteNonQuery("spInsertCash", objcash.Cash_VNo, objcash.cash_date, objcash.cash_name, objcash.Cash_purpose, objcash.cash_tag, objcash.cash_amount));
 }