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");
     }
 }
예제 #2
0
 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());
     }
 }
예제 #3
0
 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());
     }
 }
예제 #4
0
 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");
     }
 }
예제 #5
0
 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");
     }
 }
예제 #7
0
 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");
     }
 }
예제 #8
0
 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");
     }
 }
예제 #9
0
 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");
     }
 }
예제 #11
0
 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");
     }
 }
예제 #13
0
 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");
     }
 }
예제 #14
0
 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");
     }
 }
예제 #16
0
        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());
            }
        }
예제 #17
0
        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());
            }
        }
예제 #18
0
        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");
     }
 }
예제 #20
0
 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");
     }
 }
예제 #21
0
 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");
     }
 }
예제 #22
0
 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");
     }
 }
예제 #23
0
 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");
     }
 }
예제 #25
0
 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");
     }
 }
예제 #27
0
 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");
     }
 }
예제 #29
0
 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");
     }
 }