private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                double pri = 0.0;


                int id_takseet = 0;
                id_takseet = Convert.ToInt32(frm.GET_ID_TAKSEET(Convert.ToInt32(TXT_CUSTOMER_ID.Text)).Rows[0][0].ToString());



                pri = Convert.ToDouble(textBox1.Text) - Convert.ToDouble(textBox2.Text);
                frm.update_takseet(Convert.ToInt32(TXT_CUSTOMER_ID.Text), pri.ToString());
                frm.ADD_DATE_TO_TAKSEET(id_takseet, dateTimePicker1.Value, textBox2.Text);
                MessageBox.Show("تم اضافه التقسيط", "", MessageBoxButtons.OK);
                TXT_CUSTOMER_ID.Clear();
                TXT_FNAME.Clear();
                TXT_LNAME.Clear();
                textBox1.Clear();
                textBox2.Clear();
                TXT_MONTHLY_PRICE.Clear();
            }
            catch
            {
            }
        }
        void CLEAR_ALL_DATA()
        {
            TXT_ORDER_ID.Clear();
            TXT_DESC_BILL.Clear();
            TXT_CUSTOMER_ID.Clear();
            TXT_FNAME.Clear();
            TXT_LNAME.Clear();
            TXT_PHONE.Clear();
            TXT_EMAIL.Clear();
            TXT_SALE_DATE.ResetText();
            CLEAR_TXTS();
            DT.Clear();
            dataGridView1.DataSource = null;
            TXT_TOTAL_AMOUNT.Clear();
            BTM_SAVE_SALE.Enabled = false;
            BTM_NEW_SALE.Enabled = true;
            BTM_PRINT_BILL.Enabled = true;

        }
Exemplo n.º 3
0
        private void BTM_ADD_Click(object sender, EventArgs e)
        {
            try
            {
                if (TXT_RECIVE_PRICE.Text != string.Empty && TXT_RBHHH.Text != string.Empty)
                {
                    DateTime dtValue;
                    dtValue = TXT_SALE_DATEe.Value; // load your date & time into this variable
                    string montht = dtValue.ToString("MM");
                    string yearrr = dtValue.ToString("yyyy");



                    frm.ADD_TAKSET(Convert.ToInt32(TXT_CUSTOMER_ID.Text), TXT_RECIVE_PRICE.Text, TXT_PURE_PRICE.Text, CALC_RABH.ToString(), TXT_DAY_TAKSEET.Text, TXT_WHAT_NEED.Text, montht.ToString(), yearrr.ToString());
                    //MessageBox.Show("mon:" + montht + " year" + yearrr);
                    MessageBox.Show("تم اضافه التقسيط للعميل", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    TXT_CUSTOMER_ID.Clear();
                    TXT_FNAME.Clear();
                    TXT_LNAME.Clear();
                    TXT_EMAIL.Clear();
                    TXT_PHONE.Clear();
                    TXT_RBHHH.Clear();
                    TXT_DAY_TAKSEET.Clear();
                    TXT_ID_CUSTOMER_TAKSEET.Clear();
                    TXT_PURE_PRICE.Clear();
                    TXT_RECIVE_PRICE.Clear();
                    TXT_TOTAL_PRICE_TAKSEET.Clear();
                    TXT_NUM_MONTH.Clear();
                }
                else
                {
                    MessageBox.Show("يجب ادخال البيانات كامله ", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch
            {
            }
        }