private void SAVE_Click(object sender, EventArgs e)
        {
            if (Bill_No.Text == "" || Party_ID.Text == "" || AOC.Text == "" || Ac_No.Text == "" || Ch_No.Text == "" || DOW.Text == "" || Bank_Name.Text == "")
            {
                MessageBox.Show("PLEASE_FILLUP _ALL_DATA!!!");
                Bill_No.Focus();
            }
            else
            {
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter("INSERT INTO Bill_Payment(Bill_No,Party_ID,Amount_Of_Check,Account_No,Check_No,Date_Of_Withdrawn,Bank_Name,Date)VALUES('" + Bill_No.Text + "','" + Party_ID.Text + "','" + AOC.Text + "','" + Ac_No.Text + "','" + Ch_No.Text + "','" + DOW.Text + "','" + Bank_Name.Text + "','" + Date.Text + "')", con);
                sda.SelectCommand.ExecuteNonQuery();
                con.Close();

                Bill_No.Text   = "";
                Party_ID.Text  = "";
                AOC.Text       = "";
                Ac_No.Text     = "";
                Ch_No.Text     = "";
                DOW.Text       = "";
                Bank_Name.Text = "";
                Date.Text      = "";

                Bill_No.Focus();

                MessageBox.Show("SAVED_SUCCESSFULLY");
            }
        }
 private void CLEAR_Click(object sender, EventArgs e)
 {
     Bill_No.Text  = "";
     Party_ID.Text = "";
     Bill_No.Focus();
     MessageBox.Show("ALL_CLEARED__!!!");
 }
Пример #3
0
        private void UPDATE_Click(object sender, EventArgs e)
        {
            if (Total_Amount.Text == "" || Advance_Amount.Text == "" || Balance_Amount.Text == "")
            {
                MessageBox.Show("PLZ_FILL_RECOMMENDED_DATA__!!!");
            }
            else
            {
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter("UPDATE Billing_Detail SET Total_Amount='" + Total_Amount.Text + "',Advance_Amount='" + Advance_Amount.Text + "',Balance_Amount='" + Balance_Amount.Text + "' WHERE Bill_NO='" + Bill_No.Text + "'", con);
                sda.SelectCommand.ExecuteNonQuery();
                con.Close();

                Bill_No.Text        = "";
                Vehicle_ID.Text     = "";
                Party_ID.Text       = "";
                DOL.Text            = "";
                POL.Text            = "";
                POU.Text            = "";
                WIM.Text            = "";
                RPM.Text            = "";
                Total_Amount.Text   = "";
                Advance_Amount.Text = "";
                Balance_Amount.Text = "";
                Bill_Status.Text    = "";
                Material_Desc.Text  = "";
                Date.Text           = "";


                Bill_No.Focus();

                MessageBox.Show("UPDATE_SUCCESSFULLY!!!");
            }
        }
 private void CLEAR_Click(object sender, EventArgs e)
 {
     Bill_No.Text   = "";
     Party_ID.Text  = "";
     AOC.Text       = "";
     Ac_No.Text     = "";
     Ch_NO.Text     = "";
     DOW.Text       = "";
     Bank_Name.Text = "";
     Date.Text      = "";
     Bill_No.Focus();
     MessageBox.Show("ALL_CLEARED--!!!");
 }
        private void DELETE_Click(object sender, EventArgs e)
        {
            if (Bill_No.Text == "" || Party_ID.Text == "")
            {
                MessageBox.Show("PLEASE_FILL_ALL_RECOMMENDED_DATA_FIRST_!!");
            }
            else
            {
                con.Open();
                SqlCommand scd = new SqlCommand("DELETE FROM Bill_Payment WHERE Bill_No='" + Bill_No.Text + "' and Party_ID='" + Party_ID.Text + "'", con);
                scd.ExecuteNonQuery();
                con.Close();

                Bill_No.Text  = "";
                Party_ID.Text = "";
                Bill_No.Focus();

                MessageBox.Show("DELETE__SUCCESSFULLY__!!!");
            }
        }
        private void SAVE_Click(object sender, EventArgs e)
        {
            if (Bill_No.Text == "" || Vehicle_ID.Text == "" || Party_ID.Text == "" || DOL.Text == "" || POL.Text == "" || POU.Text == "" || WIM.Text == "" || RPM.Text == "" || Total_Amount.Text == "" || Advance_Amount.Text == "" || Balance_Amount.Text == "" || Bill_Status.Text == "" || Material_Desc.Text == "" || Date.Text == "")
            {
                MessageBox.Show("PLEASE_FILL_ALL_DATA");
                Bill_No.Focus();
            }

            else
            {
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter("INSERT INTO Billing_Detail(Bill_No,Vehicle_ID,Party_ID,Date_Of_Loading,Place_Of_Loading,Place_Of_Unloading,Weight_In_Matrictone,Rate_Per_Matrictone,Total_Amount,Advance_Amount,Balance_Amount,Bill_Status,Material_Description,Date)VALUES('" + Bill_No.Text + "','" + Vehicle_ID.Text + "','" + Party_ID.Text + "','" + DOL.Text + "','" + POL.Text + "','" + POU.Text + "','" + WIM.Text + "','" + RPM.Text + "','" + Total_Amount.Text + "','" + Advance_Amount.Text + "','" + Balance_Amount.Text + "','" + Bill_Status.Text + "','" + Material_Desc.Text + "','" + Date.Text + "')", con);
                sda.SelectCommand.ExecuteNonQuery();
                con.Close();

                Bill_No.Text        = "";
                Vehicle_ID.Text     = "";
                Party_ID.Text       = "";
                DOL.Text            = "";
                POL.Text            = "";
                POU.Text            = "";
                WIM.Text            = "";
                RPM.Text            = "";
                Total_Amount.Text   = "";
                Advance_Amount.Text = "";
                Balance_Amount.Text = "";
                Bill_Status.Text    = "";
                Material_Desc.Text  = "";

                Date.Text = "";

                Bill_No.Focus();

                MessageBox.Show("SAVED SUCCESSFULLY!!!");
                Add_Billing_Detail_Form ds = new Add_Billing_Detail_Form();
                this.Dispose(false);
                ds.Show();
            }
        }
Пример #7
0
        private void CLEAR_Click(object sender, EventArgs e)
        {
            Bill_No.Text        = "";
            Vehicle_ID.Text     = "";
            Party_ID.Text       = "";
            DOL.Text            = "";
            POL.Text            = "";
            POU.Text            = "";
            WIM.Text            = "";
            RPM.Text            = "";
            Total_Amount.Text   = "";
            Advance_Amount.Text = "";
            Balance_Amount.Text = "";
            Bill_Status.Text    = "";
            Material_Desc.Text  = "";
            Date.Text           = "";


            Bill_No.Focus();

            MessageBox.Show("CLEAR_SUCCESSFULLY!!!");
        }
 private void UPDATE_Click(object sender, EventArgs e)
 {
     if (AOC.Text == "" || Ch_NO.Text == "")
     {
         MessageBox.Show("PLEASE_ENTER_RECOMMENDED_DATA__!!!");
     }
     else
     {
         con.Open();
         SqlDataAdapter sda = new SqlDataAdapter("UPDATE Bill_Payment SET Amount_Of_Check='" + AOC.Text + "',Check_No='" + Ch_NO.Text + "' WHERE Bill_No='" + Bill_No.Text + "'", con);
         sda.SelectCommand.ExecuteNonQuery();
         con.Close();
         Bill_No.Text   = "";
         Party_ID.Text  = "";
         AOC.Text       = "";
         Ac_No.Text     = "";
         Ch_NO.Text     = "";
         DOW.Text       = "";
         Bank_Name.Text = "";
         Date.Text      = "";
         Bill_No.Focus();
         MessageBox.Show("Data_Updated!!");
     }
 }