protected void gvNext(object sender, EventArgs e) { try { gvEmpMgrHier.PageIndex = gvEmpMgrHier.PageIndex + 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "EmployeeManagerHierarchy"); } }
protected void ChangePage(object sender, EventArgs e) { try { gvTempCard.PageIndex = Convert.ToInt32(((DropDownList)gvTempCard.BottomPagerRow.FindControl("ddlPageNo")).SelectedValue) - 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, clsCommonHandler.PageName()); } }
protected void gvNext(object sender, EventArgs e) { try { gvTempCard.PageIndex = gvTempCard.PageIndex + 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, clsCommonHandler.PageName()); } }
protected void gvNext(object sender, EventArgs e) { try { gvManualAttnd.PageIndex = gvManualAttnd.PageIndex + 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "ESS_Sanc_View"); } }
protected void ChangePage(object sender, EventArgs e) { try { gvTimeAttendanceView.PageIndex = Convert.ToInt32(((DropDownList)gvTimeAttendanceView.BottomPagerRow.FindControl("ddlPageNo")).SelectedValue) - 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "EmployeeTimeAttendanceView"); } }
protected void gvNext(object sender, EventArgs e) { try { gvCategory.PageIndex = gvCategory.PageIndex + 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "CategoryMasterView"); } }
protected void ChangePage(object sender, EventArgs e) { try { gvEnabled.PageIndex = Convert.ToInt32(((DropDownList)gvEnabled.BottomPagerRow.FindControl("ddlPageNo")).SelectedValue) - 1; bindEnabledata(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "VehicleAdministration"); } }
protected void gvCardConfig_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { gvCardConfig.PageIndex = e.NewPageIndex; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "EmployeeCardConfigView"); } }
protected void gvPrevious(object sender, EventArgs e) { try { gvBackupData.PageIndex = gvBackupData.PageIndex - 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "RestoreSql"); } }
protected void ChangePage(object sender, EventArgs e) { try { gvCategoryLeave.PageIndex = Convert.ToInt32(((DropDownList)gvCategoryLeave.BottomPagerRow.FindControl("ddlPageNo")).SelectedValue) - 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "CompanyMasterView"); } }
protected void gvPrevious(object sender, EventArgs e) { try { gvLeaveData.PageIndex = gvLeaveData.PageIndex - 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, clsCommonHandler.PageName()); } }
protected void gvPrevious(object sender, EventArgs e) { try { gvCategoryLeave.PageIndex = gvCategoryLeave.PageIndex - 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "CompanyMasterView"); } }
protected void gvNext(object sender, EventArgs e) { try { gvView.PageIndex = gvView.PageIndex + 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "EnglishToHindiView"); } }
protected void gvView_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { gvView.PageIndex = e.NewPageIndex; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "EnglishToHindiView"); } }
protected void gvNext(object sender, EventArgs e) { try { gvAnnouncement.PageIndex = gvAnnouncement.PageIndex + 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "AdminAnnouncement"); } }
protected void btnSubmitAdd_Click(object sender, EventArgs e) { try { if (ddlLevelTypeAdd.SelectedValue.ToString().ToLower() == "2") { if (ddlEmpCodeAdd.SelectedValue.ToString() == "0") { lblErrorAdd.Text = "Please Select an Employee"; lblErrorAdd.Visible = true; mpeAddUser.Show(); ScriptManager.RegisterClientScriptBlock(UpdatePanel3, UpdatePanel3.GetType(), "Script", "validateChosen();", true); return; } } clsUserView objUser = new clsUserView(); objUser.CreatedBy = Session["uid"].ToString(); objUser.EmpID = ddlEmpCodeAdd.SelectedValue.ToString(); objUser.UserID = txtUserNameAdd.Text.Trim(); objUser.Password = Encryption.EncryptDecrypt.Encrypt(txtPasswordAdd.Text.Trim(), true); objUser.LevelID = ddlLevelTypeAdd.SelectedValue; clsUserViewHandler.UpdateUserDetails(objUser, "Insert", "", ref strErrMsg, ref strSuccMsg, clsCommonHandler.PageName()); if (strErrMsg.Trim().Length >= 1) { lblErrorAdd.Text = strErrMsg.Trim(); lblErrorAdd.Visible = true; mpeAddUser.Show(); ScriptManager.RegisterClientScriptBlock(UpdatePanel3, UpdatePanel3.GetType(), "Script", "validateChosen();", true); return; } else { lblErrorAdd.Text = strSuccMsg; lblErrorAdd.Visible = true; bindDataGrid(); FillEmployeeEntity(); txtUserNameAdd.Text = ""; txtPasswordAdd.Text = ""; txtConfirmPasswordAdd.Text = ""; ddlEmpCodeAdd.SelectedIndex = 0; ddlLevelTypeAdd.SelectedIndex = 0; mpeAddUser.Show(); ScriptManager.RegisterClientScriptBlock(UpdatePanel3, UpdatePanel3.GetType(), "Script", "validateChosen();", true); } } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, clsCommonHandler.PageName()); } }
void bindDataGrid() { try { DataTable dt = clsHolidayHandler.GetAllDetails("All"); gvHoliday.DataSource = dt; gvHoliday.DataBind(); if (dt.Rows.Count != 0) { DropDownList ddl = (DropDownList)gvHoliday.BottomPagerRow.FindControl("ddlPageNo"); for (int i = 1; i <= gvHoliday.PageCount; i++) { ddl.Items.Add(new ListItem(i.ToString(), i.ToString())); } ddl.SelectedValue = (gvHoliday.PageIndex + 1).ToString(); Label lblcount = (Label)gvHoliday.BottomPagerRow.FindControl("lblTotal"); lblcount.Text = ((DataTable)gvHoliday.DataSource).Rows.Count.ToString() + " Records."; if (gvHoliday.PageCount == 0) { ((Button)gvHoliday.BottomPagerRow.FindControl("btnPrevious")).Enabled = false; ((Button)gvHoliday.BottomPagerRow.FindControl("btnNext")).Enabled = false; } if (gvHoliday.PageIndex + 1 == gvHoliday.PageCount) { ((Button)gvHoliday.BottomPagerRow.FindControl("btnNext")).Enabled = false; } if (gvHoliday.PageIndex == 0) { ((Button)gvHoliday.BottomPagerRow.FindControl("btnPrevious")).Enabled = false; } ((Label)gvHoliday.BottomPagerRow.FindControl("lblShowing")).Text = "Showing " + ((gvHoliday.PageSize * gvHoliday.PageIndex) + 1) + " to " + (((gvHoliday.PageSize * (gvHoliday.PageIndex + 1)) - 10) + gvHoliday.Rows.Count); gvHoliday.BottomPagerRow.Visible = true; } if (dt.Rows.Count != 0) { btnDelete.Enabled = true; btnSearch.Enabled = true; } else { btnDelete.Enabled = false; btnSearch.Enabled = false; } } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, clsCommonHandler.PageName()); } }
protected void btnDelete_Click(object sender, EventArgs e) { StringBuilder strXML = new StringBuilder(); clsUserView objUser = new clsUserView(); objUser.CreatedBy = Session["uid"].ToString(); int cnt = 0; try { strXML.Append("<ent_user>"); for (int i = 0; i < gvUsers.Rows.Count; i++) { CheckBox chk = (CheckBox)gvUsers.Rows[i].FindControl("DeleteRows"); if (chk.Checked == true) { try { cnt++; strXML.Append("<User>"); strXML.Append("<UserID>" + gvUsers.Rows[i].Cells[2].Text + "</UserID>"); strXML.Append("</User>"); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "UserView"); } } } strXML.Append("</ent_user>"); if (cnt > 0) { clsUserViewHandler.UpdateUserDetails(objUser, "Delete", strXML.ToString(), ref strErrMsg, ref strSuccMsg, clsCommonHandler.PageName()); if (strErrMsg.Trim().Length >= 1) { lblMessages.Text = strErrMsg.Trim(); lblMessages.Visible = true; bindDataGrid(); } else { lblMessages.Text = strSuccMsg.Trim(); lblMessages.Visible = true; bindDataGrid(); FillEmployeeEntity(); } } } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, clsCommonHandler.PageName()); } }
protected void gvCategory_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { gvCategory.PageIndex = e.NewPageIndex; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "CategoryMasterView"); } }
protected void gvLeaveData_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { gvLeaveData.PageIndex = e.NewPageIndex; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "LeaveDataUpload"); } }
protected void gvNext(object sender, EventArgs e) { try { gvEnabled.PageIndex = gvEnabled.PageIndex + 1; bindEnabledata(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "VehicleAdministration"); } }
protected void gvNext(object sender, EventArgs e) { try { gvLeaveData.PageIndex = gvLeaveData.PageIndex + 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "LeaveDataUpload"); } }
protected void gvNext(object sender, EventArgs e) { try { gvEmployee.PageIndex = gvEmployee.PageIndex + 1; BindGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "ESS_TA_LV_View"); } }
protected void ChangePage(object sender, EventArgs e) { try { gvPersonalisation.PageIndex = Convert.ToInt32(((DropDownList)gvPersonalisation.BottomPagerRow.FindControl("ddlPageNo")).SelectedValue) - 1; BindgvPersonalisation(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "SACPersonalisation"); } }
protected void gvNext(object sender, EventArgs e) { try { gvTimeAttendanceView.PageIndex = gvTimeAttendanceView.PageIndex + 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "EmployeeTimeAttendanceView"); } }
protected void gvNext(object sender, EventArgs e) { try { gvPersonalisation.PageIndex = gvPersonalisation.PageIndex + 1; BindgvPersonalisation(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "SACPersonalisation"); } }
protected void gvCompany_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { gvTempCard.PageIndex = e.NewPageIndex; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, clsCommonHandler.PageName()); } }
protected void gvPersonalisation_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { gvPersonalisation.PageIndex = e.NewPageIndex; BindgvPersonalisation(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "SACPersonalisation"); } }
protected void gvPrevious(object sender, EventArgs e) { try { gvGP.PageIndex = gvGP.PageIndex - 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "ESS_TA_GP_View"); } }
protected void gvNext(object sender, EventArgs e) { try { gvTempCard.PageIndex = gvTempCard.PageIndex + 1; bindDataGrid(); } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "TemporaryCardViewMaster"); } }