Example #1
0
        private void add_button_Click(object sender, EventArgs e)
        {
            string        con        = ConfigurationManager.ConnectionStrings["coonstring"].ToString();
            SqlConnection connection = new SqlConnection(con);

            connection.Open();
            SqlCommand command = new SqlCommand("InsertIntoTableSalesReturnDisplay", connection);

            command.CommandType = CommandType.StoredProcedure;
            // command.Parameters.AddWithValue("@ReturnNo",ReturnNo_txtbox.Text);
            command.Parameters.AddWithValue("@Date", dateTimePicker_Sr.Text);
            //command.Parameters.AddWithValue("@SupplierName",SupplierName_txtbox.Text);
            command.Parameters.AddWithValue("@Itemname", ItemName_txtbox.Text);
            command.Parameters.AddWithValue("@CompanyName", CompanyName_txtbox.Text);
            command.Parameters.AddWithValue("@Batch", Batch_txtbox.Text);
            command.Parameters.AddWithValue("@Quantity", Quantity_Txtbox.Text);
            command.Parameters.AddWithValue("@Rate", Rate_textBox.Text);
            command.Parameters.AddWithValue("@ReturnTo", Return_txtbox.Text);
            command.Parameters.AddWithValue("@Total", total_txtbox.Text);
            command.ExecuteNonQuery();
            connection.Close();

            DisplayData();
            //SupplierName_txtbox.Clear();
            ItemName_txtbox.Clear();
            CompanyName_txtbox.Clear();
            Batch_txtbox.Clear();
            Quantity_Txtbox.Clear();
            Rate_textBox.Clear();
            Return_txtbox.Clear();
            total_txtbox.Clear();
        }
Example #2
0
 private void Clear_Click(object sender, EventArgs e)
 {
     //SupplierName_txtbox.Clear();
     ItemName_txtbox.Clear();
     CompanyName_txtbox.Clear();
     Batch_txtbox.Clear();
     Quantity_Txtbox.Clear();
     Rate_textBox.Clear();
     Return_txtbox.Clear();
     total_txtbox.Clear();
 }