private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == dataGridView1.Columns["col_view"].Index && e.RowIndex >= 0) { GetDetails ccb = new GetDetails(); customer_id = Convert.ToInt32((dataGridView1.CurrentRow.Cells["col_customer_id"].Value.ToString())); this.DialogResult = DialogResult.OK; this.Close(); } else if (e.ColumnIndex == dataGridView1.Columns["col_cancel"].Index && e.RowIndex >= 0) { DialogResult dig = MessageBox.Show("Are You Sure To Cancel Booking ??", "Delete Alert !!", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dig == DialogResult.Yes) { string today = DateTime.Now.ToString(); customer_id = Convert.ToInt32((dataGridView1.CurrentRow.Cells["col_customer_id"].Value.ToString())); int delete = pend.Cancelation(Convert.ToInt32(dataGridView1.CurrentRow.Cells["col_pend_id"].Value.ToString())); int deleteCustomer = pend.DeleteCustomer(customer_id); int deleteDetails = pend.DeleteCustomer(customer_id); if (delete > 0) { MessageBox.Show("Successfully Deleted", "Delete Alert !!"); LoadPendingBooking(); } int insert = blout.Insert_Cancel(customer_id, 0, Convert.ToDateTime(today), "Booking Cancel"); } } }
private void bunifuFlatButton1_Click(object sender, EventArgs e) { //this.Visible = false; GetDetails gd = new GetDetails(); panel1.Controls.Clear(); panel1.Controls.Add(gd); bunifuFlatButton5.BackColor = Color.Transparent; bunifuFlatButton1.BackColor = Color.FromArgb(10, 24, 45); bunifuFlatButton2.BackColor = Color.Transparent; bunifuFlatButton9.BackColor = Color.Transparent; bunifuFlatButton4.BackColor = Color.Transparent; bunifuFlatButton6.BackColor = Color.Transparent; bunifuFlatButton7.BackColor = Color.Transparent; bunifuFlatButton3.BackColor = Color.Transparent; bunifuFlatButton8.BackColor = Color.Transparent; }
private void HotelDashBoard_Load(object sender, EventArgs e) { string user_name = Login.sendtext; GetDetails details = new GetDetails(); panel1.Controls.Clear(); panel1.Controls.Add(details); btn_sales_report.Visible = false; bunifuFlatButton8.Visible = false; bunifuFlatButton7.Visible = false; bunifuroompackage.Visible = false; bunifuFlatButton4.Visible = false; bunifuFlatButton9.Visible = false; bunifuFlatButton2.Visible = false; btn_booking_report.Visible = false; bunifuFlatButton1.Visible = false; bunifuFlatButton5.Visible = false; bunifuFlatButton6.Visible = true; DataTable dt = blu.getusername(user_name); if (dt.Rows.Count > 0) { DataTable dtm = blu.Getuserhotelaccess(Convert.ToInt32(dt.Rows[0]["user_id"].ToString())); if (dtm.Rows.Count > 0) { if (dtm.Rows[0]["sales"].ToString() == "True") { bunifuFlatButton5.Visible = true; bunifuFlatButton1.Visible = true; } if (dtm.Rows[0]["room_access"].ToString() == "True") { bunifuFlatButton7.Visible = true; bunifuFlatButton8.Visible = true; bunifuroompackage.Visible = true; bunifuFlatButton9.Visible = true; } if (dtm.Rows[0]["report"].ToString() == "True") { bunifuFlatButton4.Visible = true; btn_sales_report.Visible = true; btn_booking_report.Visible = true; } else if (dtm.Rows[0]["admin"].ToString() == "True") { btn_sales_report.Visible = true; bunifuFlatButton8.Visible = true; bunifuFlatButton7.Visible = true; bunifuroompackage.Visible = true; bunifuFlatButton4.Visible = true; bunifuFlatButton9.Visible = true; bunifuFlatButton2.Visible = true; btn_booking_report.Visible = true; bunifuFlatButton9.Visible = true; } } } // WindowState = FormWindowState.Maximized; }