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 TXT_FNAME_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { TXT_LNAME.Focus(); } }
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 BTN_SAVE_Click(object sender, EventArgs e) { if (TXT_ID_NUMBER.Text.Length == 0) { TXT_ID_NUMBER.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER ID NO!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (TXT_FNAME.Text.Length == 0) { TXT_FNAME.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER FIRST NAME!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (TXT_LNAME.Text.Length == 0) { TXT_LNAME.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE ENTER LAST NAME!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (CMB_GENDER.SelectedIndex == -1) { CMB_GENDER.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT GENDER TYPE!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else if (CMB_COUNTRY.SelectedIndex == -1) { CMB_COUNTRY.Focus(); MSGBOX mdg = new MSGBOX(MessageAlertHeder.Alert(), "PLEASE SELECT COUNTRY!", MessageAlertImage.Alert()); mdg.ShowDialog(); } else { groupBox2.Enabled = false; SAVE_GUEST(); groupBox2.Enabled = true; BTN_NEW.Focus(); } }
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 { } }