private void chk_dsat_CheckedChanged(object sender, EventArgs e) { if (chk_dsat.Checked == true) { DataTable getRowbyDate = Bllbmd.getRowBYdatePushdinner(PushDate, lbl_custoemrid.Text, sat, Packagename); if (getRowbyDate.Rows.Count > 0) { int i = Bllbmd.updatefrodinnner(lbl_custoemrid.Text, sat, status, Packagename); } else { if (Packagename.Length != 0) { int i = Bllbmd.insertintodinnner(lbl_custoemrid.Text, sat, PushDate, status, Packagename); } } } else if (chk_dsat.Checked == false) { AdminAccess accs = new AdminAccess(); if (accs.ShowDialog() == DialogResult.OK) { accs.Admin_access_value = true; int j = Bllbmd.updatefrodinnner(lbl_custoemrid.Text, sat, nostatus, Packagename); chk_dsat.Checked = false; } else { chk_dsat.Checked = true; } } }
private void btn_add_Click(object sender, EventArgs e) { AdminAccess acc = new AdminAccess(); acc.ShowDialog(); if (acc.DialogResult == DialogResult.OK) { //CustomerCard_Info add = new CustomerCard_Info(); DataTable dt = customer.getnamebyno(txt_searchbox.Text); if (dt.Rows.Count > 0) { CustomerCard_Info add = new CustomerCard_Info(Convert.ToInt32(dt.Rows[0]["id"].ToString())); //id = Convert.ToInt32(dt.Rows[0]["id"].ToString()); //add.txt_name.Text = lbl_name.Text; //add.txt_card_type.Text = lbl_card_type.Text; //this.Hide(); add.ShowDialog(); } } else { MessageBox.Show("Invalid Username or Password.", "Invalid Access!!!"); } }
public void Check() { var confirmResult = MessageBox.Show("Are you you want Cash Back ??", "Confirm Cash Back!!", MessageBoxButtons.YesNo); if (confirmResult == DialogResult.Yes) { AdminAccess acc = new AdminAccess(); acc.ShowDialog(); if (acc.DialogResult == DialogResult.OK) { if (rdo_partial.Checked == true) { // DataTable dt = customer.Searchbycard(txtpan_no.Text); int partial = customer.Insert_Cash_Back(Convert.ToInt32(id), name, Convert.ToDecimal(txt_cash_back.Text), date, "Partial", "X"); int update = customer.Update_customer_balane(Convert.ToInt32(id), Convert.ToDecimal(txt_cash_back.Text)); printing(); printing(); } else if (rdo_full.Checked == true) { int full = customer.Insert_Cash_Back(Convert.ToInt32(id), name, Convert.ToDecimal(txt_cash_back.Text), date, "Full", "X"); int delete = customer.DeleteCustomer(Convert.ToInt32(id)); printing(); printing(); } int insertlog = customer.InsertCardTransaction(Convert.ToInt32(id), name, Convert.ToDecimal(txt_cash_back.Text), date, "Cash Back", "Cash"); } } btn_save.DialogResult = DialogResult.OK; }
private void btn_stop_Click(object sender, EventArgs e) { AdminAccess acc = new AdminAccess(); acc.ShowDialog(); user_access = AdminAccess.discount_access_value; if (user_access == true) { printtobill(); int update = blea.UpdateXreport(Convert.ToInt32(cbo_event_type.SelectedValue)); } }
private void btn_start_Click(object sender, EventArgs e) { if (cbo_event_type.Text != "Choose Event") { AdminAccess acc = new AdminAccess(); acc.ShowDialog(); user_access = AdminAccess.discount_access_value; if (user_access == true) { cbo_event_type.Enabled = false; event_status = true; btn_start.Enabled = false; btn_stop.Enabled = true; txt_card_no.Focus(); // this.ActiveControl = txt_card_no; } } else { MessageBox.Show("Please Choose Event.", "Event", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == dataGridView1.Columns["col_add"].Index && e.RowIndex >= 0) { AdminAccess acc = new AdminAccess(); acc.ShowDialog(); if (acc.DialogResult == DialogResult.OK) { Customer_Management.CustomerCard_Info cci = new Customer_Management.CustomerCard_Info(Convert.ToInt32(dataGridView1.CurrentRow.Cells["col_id"].Value.ToString())); cci.ShowDialog(); } } else if (e.ColumnIndex == dataGridView1.Columns["col_replace"].Index && e.RowIndex >= 0) { AdminAccess acc = new AdminAccess(); acc.ShowDialog(); panel_replace.Hide(); if (acc.DialogResult == DialogResult.OK) { panel_replace.Show(); customer_id = Convert.ToInt32((dataGridView1.CurrentRow.Cells["col_id"].Value.ToString())); lbl_cardno.Text = Convert.ToString(dataGridView1.CurrentRow.Cells["col_card_no"].Value.ToString()); DataTable dt = customer.GetPreviousBalance(Convert.ToInt32(dataGridView1.CurrentRow.Cells["col_id"].Value.ToString())); if (dt.Rows.Count > 0) { decimal card_balance = Convert.ToDecimal(dt.Rows[0]["customer_balance"].ToString()); lbl_blc.Text = Convert.ToString(card_balance); } else { lbl_blc.Text = "0.00"; } } } else if (e.ColumnIndex == dataGridView1.Columns["col_cash_back"].Index && e.RowIndex >= 0) { CustomerCashBack ccb = new CustomerCashBack(Convert.ToInt32((dataGridView1.CurrentRow.Cells["col_id"].Value.ToString()))); int customer_id = Convert.ToInt32((dataGridView1.CurrentRow.Cells["col_id"].Value.ToString())); ccb.lbl_customer.Text = dataGridView1.CurrentRow.Cells["col_name"].Value.ToString() + dataGridView1.CurrentRow.Cells["col_last_name"].Value.ToString(); ccb.card_type = dataGridView1.CurrentRow.Cells["col_card_type"].Value.ToString(); ccb.lbl_customer_no.Text = dataGridView1.CurrentRow.Cells["col_card_no"].Value.ToString(); DataTable dt = customer.GetPreviousBalance(Convert.ToInt32(dataGridView1.CurrentRow.Cells["col_id"].Value.ToString())); if (dt.Rows.Count > 0) { decimal card_balance = Convert.ToDecimal(dt.Rows[0]["customer_balance"].ToString()); ccb.lbl_id.Text = dataGridView1.CurrentRow.Cells["col_id"].Value.ToString(); ccb.txt_card_blc.Text = Convert.ToString(card_balance); ccb.ShowDialog(); if (ccb.btn_save.DialogResult == DialogResult.OK) { Loadcustomer(); } } else { MessageBox.Show("Sorry Customer Have 0.00 Balance.", "Transaction Fail", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }