protected void BtnUpdate_Click(object sender, EventArgs e) { if (HiddeniD.Value == "") { DisplayMessage("Edit The Record"); DdlMonthList.Focus(); return; } int UpdationCheck = 0; UpdationCheck = ObjPenalty.UpdateRecord_In_Pay_Employee_Penalty(Session["CompId"].ToString(), HiddeniD.Value, TxtPenaltyNameList.Text, TxtPenaltyDiscList.Text, DdlvalueTypelist.SelectedValue, Txtvaluelist.Text, DdlMonthListPanel.SelectedValue, TxtpanelYearList.Text, Session["UserId"].ToString(), DateTime.Now.ToString()); if (UpdationCheck != 0) { DisplayMessage("Record Updated"); DataTable dtGrid = new DataTable(); dtGrid = ObjPenalty.GetRecord_From_PayEmployeePenalty(Session["CompId"].ToString(), "0", "0", DdlMonthList.SelectedValue, TxtYear.Text, "", ""); GridViewPenaltyList.DataSource = dtGrid; GridViewPenaltyList.DataBind(); DdlMonthList.Focus(); ResetPanel(); } else { DisplayMessage("Record Not Updated"); } }
protected void BtnRefreshList_Click(object sender, ImageClickEventArgs e) { int CurrentMonth = Convert.ToInt32(DateTime.Now.Month); DdlMonthList.SelectedValue = (CurrentMonth).ToString(); TxtYearList.Text = DateTime.Now.Year.ToString(); GridBind_ClaimList(DdlMonthList.SelectedValue, TxtYearList.Text); DdlMonthList.Focus(); }
protected void BtnUpdate_Click(object sender, EventArgs e) { if (HiddeniD.Value == "") { DisplayMessage("Edit The Record"); DdlMonthList.Focus(); return; } int count = 0; string Status = ""; if (RbtnApproved.Checked == true) { count = 1; Status = "Approved"; } if (RbtnCancelled.Checked == true) { count = 1; Status = "Cancelled"; } if (count == 0) { DisplayMessage("Select RadioButton"); RbtnApproved.Focus(); Status = ""; return; } int UpdationCheck = 0; UpdationCheck = ObjClaim.UpdateRecord_In_Pay_Employee_Claim(Session["CompId"].ToString(), HiddeniD.Value, TxtClaimNameList.Text, TxtClaimDiscList.Text, DdlvalueTypelist.SelectedValue, Txtvaluelist.Text, DdlMonthListPanel.SelectedValue, TxtpanelYearList.Text, Status, Session["UserId"].ToString(), DateTime.Now.ToString()); if (UpdationCheck != 0) { DisplayMessage("Record Updated"); DataTable dtGrid = new DataTable(); dtGrid = ObjClaim.GetRecord_From_PayEmployeeClaim(Session["CompId"].ToString(), "0", "0", DdlMonthList.SelectedValue, TxtYear.Text, "Pending", "", ""); GridViewClaimList.DataSource = dtGrid; GridViewClaimList.DataBind(); PanelUpdateClaim.Visible = false; ResetPanel(); DdlMonthList.Focus(); } else { DisplayMessage("Record Not Updated"); } }
protected void btnLeast_Click(object sender, EventArgs e) { PanelUpdateClaim.Visible = false; PanelList.BackColor = System.Drawing.ColorTranslator.FromHtml("#ccddee"); pnlLeave.BackColor = System.Drawing.ColorTranslator.FromHtml("#90bde9"); DdlMonthList.Focus(); PanelSearchList.Visible = true; PnlEmployeeLeave.Visible = false; int CurrentMonth = Convert.ToInt32(DateTime.Now.Month); DdlMonthList.SelectedValue = (CurrentMonth).ToString(); TxtYearList.Text = DateTime.Now.Year.ToString(); GridBind_ClaimList(DdlMonthList.SelectedValue, TxtYearList.Text); }
void GridBind_PenaltyList(string Month, string Year) { DataTable Dt = new DataTable(); Dt = ObjPenalty.GetRecord_From_PayEmployeePenalty(Session["CompId"].ToString(), "0", "0", Month, Year, "", ""); if (Dt.Rows.Count > 0) { GridViewPenaltyList.DataSource = Dt; GridViewPenaltyList.DataBind(); } else { Dt.Clear(); GridViewPenaltyList.DataSource = Dt; GridViewPenaltyList.DataBind(); DisplayMessage("Record Not found"); DdlMonthList.Focus(); } }
void GridBind_ClaimList(string Month, string Year) { DataTable Dt = new DataTable(); Dt = ObjClaim.GetRecord_From_PayEmployeeClaim(Session["CompId"].ToString(), "0", "0", Month, Year, "Pending", "", ""); if (Dt.Rows.Count > 0) { GridViewClaimList.DataSource = Dt; GridViewClaimList.DataBind(); Session["dtFilter"] = Dt; } else { Dt.Clear(); GridViewClaimList.DataSource = Dt; GridViewClaimList.DataBind(); DisplayMessage("Record Not found"); DdlMonthList.Focus(); } }
protected void BtnResetPenalty_Click(object sender, EventArgs e) { ResetPanel(); DdlMonthList.Focus(); }