protected void btnSubmit_Click(object sender, EventArgs e) { int empRecNumber; if (DatePicker.SelectedDate.ToShortDateString() == "1/1/0001") { MessageBox.Show("Please Choose date to view Employee Slots", "??", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if(ddlEmployeeID.SelectedValue==".:Select Employee:.") { MessageBox.Show("Please Choose an employee", "??", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { ddlEmployeeID_SelectedIndexChanged(sender, e); foreach (GridViewRow rowItem in grvSlots.Rows) { CheckBox chk = (CheckBox)(rowItem.Cells[0].FindControl("CheckBox1")); if (chk.Checked) { string slotName = (grvSlots.DataKeys[rowItem.RowIndex]["SlotName"].ToString()); Session["date"] = DatePicker.SelectedDate.ToShortDateString(); empRecNumber = Convert.ToInt32(Session["idnumber"]); const string status = "a"; ClsAppointmentSlots slots = new ClsAppointmentSlots(slotName, Session["date"].ToString(), Convert.ToInt32(empRecNumber), status); MessageBox.Show(slotName + "\n" + Session["date"].ToString() + "\n" + Convert.ToInt32(empRecNumber)+ "\n" +status); systemBusinessLayer.setSlot(slots); chkAll_CheckedChanged(sender, e); chk.Checked = false; } } } else { System.Windows.Forms.MessageBox.Show("Sorry you can not an appointment slot for previous days"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)