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 { } }
private void BTM_NEW_Click(object sender, EventArgs e) { TXT_FNAME.Clear(); TXT_LNAME.Clear(); TXT_PHONE.Clear(); TXT_EMAIL.Clear(); TXT_FNAME.Focus(); BTM_ADD.Enabled = true; BTM_NEW.Enabled = false; }
private void CLEAR_ALL() { LBL_GUEST.Text = "N/A"; TXT_ID_NUMBER.Clear(); TXT_FNAME.Clear(); TXT_LNAME.Clear(); CMB_GENDER.SelectedIndex = -1; CMB_COUNTRY.SelectedIndex = -1; TXT_MOBILENO.Text = "0"; TXT_PASSPORT.Clear(); TXT_ADDRESS.Clear(); TXT_EMAIL.Clear(); }
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; }
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 { } }