当前位置: 首页>>代码示例>>C#>>正文


C# BAL.Report类代码示例

本文整理汇总了C#中Attendance.BAL.Report的典型用法代码示例。如果您正苦于以下问题:C# Report类的具体用法?C# Report怎么用?C# Report使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Report类属于Attendance.BAL命名空间,在下文中一共展示了Report类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetPettyCashDetails

        private void GetPettyCashDetails()
        {
            try
            {
                Attendance.BAL.Report obj = new Report();
                DataSet ds = obj.GetPettyCashDetails(Session["LocationName"].ToString());
                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        grdPettyCashDet.DataSource = ds.Tables[0];
                        grdPettyCashDet.DataBind();

                        grdExpenseDetails.DataSource = ds.Tables[0];
                        grdExpenseDetails.DataBind();
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
开发者ID:kamaelyoung,项目名称:HR.bizstrides,代码行数:22,代码来源:PettyCashManagement.aspx.cs

示例2: btnSave_Click

        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                Attendance.Entities.PettyCashInfo objInfo = new Attendance.Entities.PettyCashInfo();
                objInfo.AccountName = txtName.Text==""?"":GeneralFunction.ToProper(txtName.Text);
                objInfo.AmountType = ddlIncomeType.SelectedItem.Text;
                objInfo.AccountDate = txtDate.Text == "" ? Convert.ToDateTime("01/01/1900") : Convert.ToDateTime(txtDate.Text);
                objInfo.InitialAmoun = txtIncome.Text;
                objInfo.FromWhom = txtFrmWhom.Text == "" ? "" : GeneralFunction.ToProper(txtFrmWhom.Text);
                objInfo.ChequeNum = txtChequeNum.Text;
                objInfo.ExpenseAmount = txtExpenseAmnt.Text;
                objInfo.ExpenseDate = txtExpenseDate.Text == "" ? Convert.ToDateTime("01/01/1900") : Convert.ToDateTime(txtExpenseDate.Text);
                objInfo.Expensetype = txtExpenseType.Text;
                objInfo.ExpenseSubType = txtExpenseSubType.Text;
                objInfo.ExpenseManName = txtServiceName.Text == "" ? "" : GeneralFunction.ToProper(txtServiceName.Text);
                objInfo.BillNum = txtBillNum.Text;
                objInfo.VoucherNum = txtVoucherNum.Text;
                objInfo.Notes = txtNotes.Text == "" ? "" : GeneralFunction.ToProperNotes(txtNotes.Text);
                string Locationname = Session["LocationName"].ToString();
                int UserID = Convert.ToInt32(Session["UserID"]);

                Attendance.BAL.Report obj = new Report();
                bool bnew = obj.SavePettyCashDetails(objInfo, UserID, Locationname);

                if (bnew)
                {
                    System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('Saved successfully..');", true);
                    GetPettyCashDetails();

                }

            }
            catch (Exception ex)
            {

            }
        }
开发者ID:hugo-mirad,项目名称:test-hr-live,代码行数:38,代码来源:PettyCashManagement.aspx.cs

示例3: btnGo_Click

        protected void btnGo_Click(object sender, EventArgs e)
        {
            try
            {
                int userid = Convert.ToInt32(Session["UserID"]);

                DateTime StartDate = Convert.ToDateTime(txtFromDate.Text);
                DateTime EndTime = Convert.ToDateTime(txtToDate.Text);
                ViewState["StartRptDt"] = StartDate;
                ViewState["EndRptDt"] = EndTime;
                Attendance.BAL.Report obj = new Report();
                DateTime Count = obj.GetFreezedDate(EndTime, Session["LocationName"].ToString());
                if (Count.ToString("MM/dd/yyyy") != "01/01/1900")
                {
                    lblFreeze.Text = "";
                }
                else
                {
                    lblFreeze.Text = "This is tentative attendance report.Some or part of the attendance not yet freezed";
                }

                GetReport(StartDate, EndTime, userid);
                BindListOfNewEmployee();
                BindListofChanges();


            }
            catch (Exception ex)
            {
            }
        }
开发者ID:kamaelyoung,项目名称:HR.bizstrides,代码行数:31,代码来源:PayRoll.aspx.cs

示例4: ddlReportType_SelectedIndexChanged

        protected void ddlReportType_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                int userid = Convert.ToInt32(Session["UserID"]);
                //  string IsAdmin = Session["IsAdmin"].ToString();


                if (ddlReportType.SelectedItem.Value == "2")
                {
                    DateTime todayDate = Convert.ToDateTime(Session["TodayBannerDate"]);

                    // DateTime startOfMonth = new DateTime(todayDate.Year, todayDate.Month, 1);
                    DateTime startDate = GeneralFunction.GetFirstDayOfWeekDate(todayDate);
                    DateTime StartDate = startDate.AddDays(1 - startDate.Day);
                    ViewState["StartMonth"] = StartDate.AddMonths(-6);
                    ViewState["CurrentMonth"] = StartDate.AddMonths(-6);
                    hdnMonthlyStartDt.Value = StartDate.AddMonths(-6).ToString();
                    DateTime endDate = StartDate.AddSeconds(-1);
                    ViewState["CrntMonthEnd"] = endDate;
                    DataTable dt = GetMonthlyreport(StartDate.AddMonths(-6), endDate);
                    btnFreeze.Visible = false;
                    lblFreeze.Visible = false;

                    if (dt.Rows.Count > 0)
                    {
                        grdAttandence.DataSource = null;
                        grdAttandence.DataBind();
                        grdWeeklyAttendance.DataSource = null;
                        grdWeeklyAttendance.DataBind();
                        grdMonthlyAttendance.DataSource = dt;
                        grdMonthlyAttendance.DataBind();
                    }

                }

                if (ddlReportType.SelectedItem.Value == "1")
                {
                    DateTime todayDate = Convert.ToDateTime(Session["TodayDate1"]);

                    // DateTime startOfMonth = new DateTime(todayDate.Year, todayDate.Month, 1);
                    DateTime startDate = GeneralFunction.GetFirstDayOfWeekDate(todayDate);
                    DateTime StartDate = startDate.AddDays(-21);
                    ViewState["TodayDate1"] = StartDate;
                    ViewState["CurrentWeek"] = StartDate;
                    hdnWeeklyStartDt.Value = StartDate.ToString();
                    DateTime endDate = startDate.AddDays(6);
                    ViewState["CrntWkEnd"] = endDate;
                    DataTable dt = GetWeeklyReport(StartDate, endDate);
                    btnFreeze.Visible = false;
                    lblFreeze.Visible = false;
                    if (GeneralFunction.GetFirstDayOfWeekDate(endDate).ToString("MM/dd/yyyy") == GeneralFunction.GetFirstDayOfWeekDate(DateTime.Now).ToString("MM/dd/yyyy"))
                    {
                        btnNext.CssClass = "btn btn-danger btn-small disabled";
                        btnNext.Enabled = false;
                    }
                    else
                    {
                        btnNext.CssClass = "btn btn-danger btn-small enabled";
                        btnNext.Enabled = true;

                    }



                    if (dt.Rows.Count > 0)
                    {
                        grdAttandence.DataSource = null;
                        grdAttandence.DataBind();
                        grdWeeklyAttendance.DataSource = dt;
                        grdWeeklyAttendance.DataBind();
                        grdMonthlyAttendance.DataSource = null;
                        grdMonthlyAttendance.DataBind();
                    }

                }
                if (ddlReportType.SelectedItem.Value == "0")
                {
                    DateTime TodayDate = Convert.ToDateTime(Session["TodayDate"]);
                    DateTime StartDate = GeneralFunction.GetFirstDayOfWeekDate(TodayDate);
                    DateTime EndDate = GeneralFunction.GetLastDayOfWeekDate(TodayDate);

                    if (GeneralFunction.GetFirstDayOfWeekDate(TodayDate).ToString("MM/dd/yyyy") == GeneralFunction.GetFirstDayOfWeekDate(DateTime.Now).ToString("MM/dd/yyyy"))
                    {
                        btnNext.CssClass = "btn btn-danger btn-small disabled";
                        btnNext.Enabled = false;
                    }
                    else
                    {
                        btnNext.CssClass = "btn btn-danger btn-small enabled";
                        btnNext.Enabled = true;
                    }

                    btnFreeze.Visible = true;
                    lblFreeze.Visible = true;
                    //   DateTime TodayDate = Convert.ToDateTime(Session["TodayDate"]);
                    DateTime StartOfMonth = StartDate.AddDays(-1);
                    DateTime FreezeDate = StartOfMonth;
                    Attendance.BAL.Report obj = new Report();
                    // int CNT = obj.GetFreezedDate(FreezeDate);
//.........这里部分代码省略.........
开发者ID:BInny1,项目名称:HR.bizstrides,代码行数:101,代码来源:AdminReports.aspx.cs

示例5: GetWeeklyReport

        private DataTable GetWeeklyReport(DateTime startdate, DateTime enddate)
        {
            DataTable dtAttandence = new DataTable();
            try
            {
                lblWeekReportheading.Text = "Weekly summary attendance report";
                DateTime endOfMonth = GeneralFunction.GetFirstDayOfWeekDate(enddate);
                lblWeekReport.Text = "( Wk of " + startdate.ToString("MM/dd/yyyy") + " - Wk of " + endOfMonth.ToString("MM/dd/yyyy") + " )";
                dtAttandence.Columns.Add("empid", typeof(string));
                dtAttandence.Columns.Add("Empname", typeof(string));
                dtAttandence.Columns.Add("StatingDate", typeof(string));
                dtAttandence.Columns.Add("TermDate", typeof(string));
                dtAttandence.Columns.Add("TermReason", typeof(string));
              
                dtAttandence.Rows.Add();
                Attendance.BAL.Report obj = new Report();
               

                DataSet ds = obj.GetActiveUsersAdmin(startdate, enddate, ViewState["Location"].ToString().Trim());

                for (int j = 0; j < 4; j++)
                {

                    DataSet dsResult = obj.GetWeeklyReportAdmin(startdate, startdate.AddDays(6), ViewState["Location"].ToString().Trim());

                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        dtAttandence.Columns.Add("Week" + (j + 1), typeof(string));
                        dtAttandence.Columns.Add("Days" + (j + 1), typeof(string));

                        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                        {
                            if (j == 0)
                            {
                                dtAttandence.Rows.Add();
                            }
                            dtAttandence.Rows[i]["empid"] = ds.Tables[0].Rows[i]["empid"].ToString();
                            dtAttandence.Rows[i]["empname"] = ds.Tables[0].Rows[i]["firstName"].ToString() + " " + ds.Tables[0].Rows[i]["lastname"].ToString();
                            dtAttandence.Rows[i]["StatingDate"] = ds.Tables[0].Rows[i]["Startdate"].ToString() == "NULL" ? "" : ds.Tables[0].Rows[i]["Startdate"].ToString();
                            dtAttandence.Rows[i]["TermDate"] = ds.Tables[0].Rows[i]["Termdate"].ToString() == "NULL" ? "" : ds.Tables[0].Rows[i]["Termdate"].ToString();
                            if (dsResult.Tables.Count > 0)
                            {
                                if (dsResult.Tables[0].Rows.Count > 1)
                                {
                                    DataTable dt = dsResult.Tables[0];
                                    DataView dv = dt.DefaultView;
                                    DataTable dtname = new DataTable();
                                    dv.RowFilter = "empid='" + ds.Tables[0].Rows[i]["empid"].ToString() + "'";
                                    dtname = dv.ToTable();
                                    if (dtname.Rows.Count > 0)
                                    {
                                        // dtAttandence.Rows[i]["Week" + (j + 1)] = dtname.Rows[0]["weeklyhrs"].ToString();
                                        dtAttandence.Rows[i]["Week" + (j + 1)] = dtname.Rows[0]["weeklyhrs"].ToString() == "NULL" ? "" : dtname.Rows[0]["weeklyhrs"].ToString() == "" ? "" : GeneralFunction.CalNumericToint(Convert.ToDouble(dtname.Rows[0]["weeklyhrs"].ToString())).ToString();
                                        dtAttandence.Rows[i]["Days" + (j + 1)] = dtname.Rows[0]["days"].ToString() == "NULL" ? 0 : dtname.Rows[0]["days"].ToString() == "" ? 0 : Convert.ToInt32(dtname.Rows[0]["days"].ToString());
                                    }
                                }
                            }
                        }
                        startdate = startdate.AddDays(7);
                        enddate = startdate.AddDays(6);
                    }

                }

                int TotalHrs1 = 0;
                int TotalHrs2 = 0;
                int TotalHrs3 = 0;
                int TotalHrs4 = 0;
                int TotalDays = 0;
                int Days1 = 0;
                int Days2 = 0;
                int Days3 = 0;
                int Days4 = 0;

                dtAttandence.Columns.Add("Totalhrs");
                dtAttandence.Columns.Add("Days");
                for (int i = 0; i < dtAttandence.Rows.Count - 1; i++)
                {
                    TotalHrs1 = TotalHrs1 + ((dtAttandence.Rows[i]["Week1"].ToString() == "Null") ? 0 : (dtAttandence.Rows[i]["Week1"].ToString() == "") ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Week1"]));
                    TotalHrs2 = TotalHrs2 + (dtAttandence.Rows[i]["Week2"].ToString() == "Null" ? 0 : dtAttandence.Rows[i]["Week2"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Week2"]));
                    TotalHrs3 = TotalHrs3 + ((dtAttandence.Rows[i]["Week3"].ToString() == "Null" ? 0 : (dtAttandence.Rows[i]["Week3"].ToString() == "") ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Week3"])));
                    TotalHrs4 = TotalHrs4 + (dtAttandence.Rows[i]["Week4"].ToString() == "Null" ? 0 : dtAttandence.Rows[i]["Week4"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Week4"]));

                    int WeekHrs = ((dtAttandence.Rows[i]["Week1"].ToString() == "Null" ? 0 : dtAttandence.Rows[i]["Week1"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Week1"])) +
                                                     (dtAttandence.Rows[i]["Week2"].ToString() == "Null" ? 0 : dtAttandence.Rows[i]["Week2"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Week2"])) +
                                                     (dtAttandence.Rows[i]["Week3"].ToString() == "Null" ? 0 : dtAttandence.Rows[i]["Week3"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Week3"])) +
                                                     (dtAttandence.Rows[i]["Week4"].ToString() == "Null" ? 0 : dtAttandence.Rows[i]["Week4"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Week4"])));
                    dtAttandence.Rows[i]["Totalhrs"] = WeekHrs == 0 ? "" : GeneralFunction.ConverttoTime(WeekHrs).ToString();
                    dtAttandence.Rows[i]["Days"] = (dtAttandence.Rows[i]["Days1"].ToString() == "NULL" ? 0 : dtAttandence.Rows[i]["Days1"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Days1"]))
                             + (dtAttandence.Rows[i]["Days2"].ToString() == "NULL" ? 0 : dtAttandence.Rows[i]["Days2"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Days2"]))
                             + (dtAttandence.Rows[i]["Days3"].ToString() == "NULL" ? 0 : dtAttandence.Rows[i]["Days3"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Days3"]))
                             + (dtAttandence.Rows[i]["Days4"].ToString() == "NULL" ? 0 : dtAttandence.Rows[i]["Days4"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Days4"]));

                    Days1 += dtAttandence.Rows[i]["Days1"].ToString() == "NULL" ? 0 : dtAttandence.Rows[i]["Days1"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Days1"]);
                    Days2 += dtAttandence.Rows[i]["Days2"].ToString() == "NULL" ? 0 : dtAttandence.Rows[i]["Days2"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Days2"]);
                    Days3 += dtAttandence.Rows[i]["Days3"].ToString() == "NULL" ? 0 : dtAttandence.Rows[i]["Days3"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Days3"]);
                    Days4 += dtAttandence.Rows[i]["Days4"].ToString() == "NULL" ? 0 : dtAttandence.Rows[i]["Days4"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Days4"]);

                    
                    TotalDays += dtAttandence.Rows[i]["Days"].ToString() == "NULL" ? 0 : dtAttandence.Rows[i]["Days"].ToString() == "" ? 0 : Convert.ToInt32(dtAttandence.Rows[i]["Days"].ToString());
//.........这里部分代码省略.........
开发者ID:BInny1,项目名称:HR.bizstrides,代码行数:101,代码来源:AdminReports.aspx.cs

示例6: getLocations

        private void getLocations()
        {
            try
            {
                Attendance.BAL.Report obj = new Report();
                DataTable dt = obj.GetLocations();
                ddlLocation.DataSource = dt;
                ddlLocation.DataTextField = "LocationName";
                ddlLocation.DataValueField = "LocationId";
                ddlLocation.DataBind();
            }
            catch (Exception ex)
            {

            }
        }
开发者ID:BInny1,项目名称:HR.bizstrides,代码行数:16,代码来源:AdminReports.aspx.cs

示例7: GetSchedules

        private void GetSchedules()
        {


            try
            {
                Attendance.BAL.Report obj = new Report();
                DataTable dt = obj.GetAllScheduleTypes();
                ddlSchedule.DataSource = dt;
                ddlSchedule.DataTextField = "ScheduleType";
                ddlSchedule.DataValueField = "ScheduleID";

                ddlSchedule.DataBind();

            }
            catch (Exception ex)
            {
            }
        }
开发者ID:kamaelyoung,项目名称:HR.bizstrides,代码行数:19,代码来源:AdminUserManagement.aspx.cs

示例8: GetUserDetails

        private void GetUserDetails(int sort,string Location)
        {
            try
            {
                Attendance.BAL.Report obj = new Report();

                DataTable dt = obj.GetUsers(Location.Trim(), sort);
                Session["AllusersData"] = dt;
                if (dt.Rows.Count > 0)
                {
                    
                    if (sort == 0)
                    {
                        lblTotal.Text = "Total employee: " + dt.Rows[0]["TotalCount"].ToString() + " " + " " + " " + " " + "Active employee: " + dt.Rows[0]["ActiveCount"].ToString() + " " + " " + " " + " " + "Incative employee: " + dt.Rows[0]["InactiveCount"].ToString();
                    }
                    else if (sort == 1)
                    {
                        lblTotal.Text = "Total employee: " + dt.Rows[0]["TotalCount"].ToString() + " " + " " + " " + " " + "Active employee: " + dt.Rows[0]["ActiveCount"].ToString() + " " + " " + " " + " " + "Incative employee: " + dt.Rows[0]["InactiveCount"].ToString();
                    }
                    else
                    {
                        lblTotal.Text = "Total employee: " + dt.Rows[0]["TotalCount"].ToString() + " " + " " + " " + " " + "Active employee: " + dt.Rows[0]["ActiveCount"].ToString() + " " + " " + " " + " " + "Incative employee: " + dt.Rows[0]["InactiveCount"].ToString();
                    }
                    grdUsers.DataSource = dt;
                    grdUsers.DataBind();

                    BizUtility.GridSortInitail("Ascending", "Firstname", grdUsers, 0, dt);
                }
            }
            catch (Exception ex)
            {
            }
        }
开发者ID:kamaelyoung,项目名称:HR.bizstrides,代码行数:33,代码来源:AdminUserManagement.aspx.cs

示例9: Getdepartments

 private void Getdepartments()
 {
     try
     {
         Attendance.BAL.Report obj = new Report();
         DataTable dt = obj.GetAllDepartments();
         ddlDeptment.DataSource = dt;
         ddlDeptment.DataTextField = "Deptname";
         ddlDeptment.DataValueField = "DeptID";
         ddlDeptment.DataBind();
         ddlEditDepart.DataSource = dt;
         ddlEditDepart.DataTextField = "Deptname";
         ddlEditDepart.DataValueField = "DeptID";
         ddlEditDepart.DataBind();
     }
     catch (Exception ex)
     {
     }
 }
开发者ID:kamaelyoung,项目名称:HR.bizstrides,代码行数:19,代码来源:AdminUserManagement.aspx.cs

示例10: GetNamesList

        private void GetNamesList(string Fieldname, DataTable dt)
        {
            try
            {

                if (Fieldname == "Department")
                {
                    Attendance.BAL.Report obj = new Report();
                    DataTable ds = obj.GetAllDepartments();

                    ddlNewValue.DataSource = ds;
                    ddlNewValue.DataTextField = "DeptName";
                    ddlNewValue.DataValueField = "DeptID";
                    ddlNewValue.DataBind();
                    ddlNewValue.SelectedIndex = ddlNewValue.Items.IndexOf(ddlNewValue.Items.FindByValue(dt.Rows[0]["NewValue"].ToString()));
                    txtEditNewValue.Visible = false;
                    ddlNewValue.Visible = true;
                }

                else if (Fieldname == "Location")
                {
                    Attendance.BAL.Report obj = new Report();
                    DataTable ds = obj.GetLocations();

                    ddlNewValue.DataSource = ds;
                    ddlNewValue.DataTextField = "LocationName";
                    ddlNewValue.DataValueField = "LocationId";
                    ddlNewValue.DataBind();
                    ddlNewValue.SelectedIndex = ddlNewValue.Items.IndexOf(ddlNewValue.Items.FindByValue(dt.Rows[0]["NewValue"].ToString()));
                    txtEditNewValue.Visible = false;
                    ddlNewValue.Visible = true;
                }
                else if (Fieldname == "Schedule")
                {
                    Attendance.BAL.Report obj = new Attendance.BAL.Report();
                    DataTable ds = obj.GetAllScheduleTypes();

                    ddlNewValue.DataSource = ds;
                    ddlNewValue.DataValueField = "ScheduleID";
                    ddlNewValue.DataTextField = "ScheduleType";
                    ddlNewValue.DataBind();

                    ddlNewValue.SelectedIndex = ddlNewValue.Items.IndexOf(ddlNewValue.Items.FindByValue(dt.Rows[0]["NewValue"].ToString()));
                    txtEditNewValue.Visible = false;
                    ddlNewValue.Visible = true;
                }

                else if (Fieldname == "State")
                {
                    Attendance.BAL.Business obj = new Attendance.BAL.Business();
                    DataTable ds = obj.GetState();

                    ddlNewValue.DataSource = ds;
                    ddlNewValue.DataValueField = "StateID";
                    ddlNewValue.DataTextField = "StateName";
                    ddlNewValue.DataBind();

                    ddlNewValue.SelectedIndex = ddlNewValue.Items.IndexOf(ddlNewValue.Items.FindByValue(dt.Rows[0]["NewValue"].ToString()));

                    txtEditNewValue.Visible = false;
                    ddlNewValue.Visible = true;
                }
                else if (Fieldname == "Wage")
                {
                    Attendance.BAL.Report obj = new Attendance.BAL.Report();
                    DataTable ds = obj.GetAllWages();

                    ddlNewValue.DataSource = ds;
                    ddlNewValue.DataValueField = "WageID";
                    ddlNewValue.DataTextField = "WageType";
                    ddlNewValue.DataBind();

                    txtEditNewValue.Visible = false;

                    ddlNewValue.Visible = true;

                    ddlNewValue.SelectedIndex = ddlNewValue.Items.IndexOf(ddlNewValue.Items.FindByValue(dt.Rows[0]["NewValue"].ToString()));
                }
                else if (Fieldname == "Employee type")
                {
                    Attendance.BAL.Report obj = new Attendance.BAL.Report();
                    DataTable ds = obj.GetAllEmployeetypes();

                    ddlNewValue.DataSource = ds;
                    ddlNewValue.DataValueField = "EmpType";
                    ddlNewValue.DataTextField = "EmpTypeID";
                    ddlNewValue.DataBind();

                    ddlNewValue.SelectedIndex = ddlNewValue.Items.IndexOf(ddlNewValue.Items.FindByValue(dt.Rows[0]["NewValue"].ToString()));

                    txtEditNewValue.Visible = false;

                    ddlNewValue.Visible = true;
                }
                else if (Fieldname == "Shift")
                {
                    Attendance.BAL.EmployeeBL obj = new Attendance.BAL.EmployeeBL();
                    DataTable ds = obj.GetShifts();
                    DataView dv = ds.DefaultView;
                    dv.RowFilter = "locationID=" + Convert.ToInt32(dt.Rows[0]["locationID"].ToString());
//.........这里部分代码省略.........
开发者ID:hugo-mirad,项目名称:test-hr-live,代码行数:101,代码来源:EffectiveManagement.aspx.cs

示例11: btnCurrent_Click

        protected void btnCurrent_Click(object sender, EventArgs e)
        {
            try
            {
                int userid = Convert.ToInt32(Session["UserID"]);
                string Ismanage = Session["IsManage"].ToString();
                string IsAdmin = Session["IsAdmin"].ToString();

                if (ddlReportType.SelectedValue == "0")
                {

                    DateTime StartDate = Convert.ToDateTime(ViewState["CurrentStart"].ToString());
                    DateTime EndDate = Convert.ToDateTime(ViewState["CurrentEnd"].ToString());
                    Session["TodayDate"] = StartDate;
                    if (GeneralFunction.GetFirstDayOfWeekDate(StartDate).ToString("MM/dd/yyyy") == GeneralFunction.GetFirstDayOfWeekDate(DateTime.Now).ToString("MM/dd/yyyy"))
                    {
                        btnNext.CssClass = "btn btn-danger btn-small disabled";
                        btnNext.Enabled = false;
                    }
                    else
                    {
                        btnNext.CssClass = "btn btn-danger btn-small enabled";
                        btnNext.Enabled = true;
                    }

                    DataTable ds = new DataTable();

                    lblReport.Text = "Report type";
                    ddlReportType.Visible = true;
                    lblReport.Visible = true;

                    btnFreeze.Visible = true;
                    lblFreeze.Visible = true;
                    DateTime TodayDate = Convert.ToDateTime(Session["TodayDate"]);
                    DateTime StartOfMonth = GeneralFunction.GetFirstDayOfWeekDate(TodayDate);
                    DateTime FreezeDate = StartOfMonth.AddDays(-1);
                    Attendance.BAL.Report obj = new Report();
                    // int CNT = obj.GetFreezedDate(FreezeDate);
                    DateTime CNT = obj.GetFreezedDate(FreezeDate, Session["LocationName"].ToString().Trim(), Convert.ToInt32(ddlShift.SelectedValue));
                    lblFreezedate.Text = FreezeDate.ToString("MM/dd/yyyy");
                    hdnFreeze.Value = FreezeDate.ToString("MM/dd/yyyy");
                    if (CNT.ToString("MM/dd/yyyy") != "01/01/1900")
                    {
                        lblFreeze.Text = "Attendance freezed until " + CNT.ToString("MM/dd/yyyy");
                        ViewState["FreezeDate"] = CNT.ToString("MM/dd/yyyy");
                        btnFreeze.CssClass = "btn btn-warning btn-small disabled";
                        btnFreeze.Enabled = false;
                    }
                    else
                    {
                        lblFreeze.Visible = false;
                        btnFreeze.CssClass = "btn btn-warning btn-small enabled";
                        btnFreeze.Enabled = true;
                    }

                    ds = GetReport(StartDate, EndDate, userid, Convert.ToInt32(ddlShift.SelectedItem.Value));
                    if (ds.Rows.Count > 1)
                    {
                        Session["AtnDetails"] = ds;
                        grdAttandence.DataSource = ds;
                        grdAttandence.DataBind();
                        grdWeeklyAttendance.DataSource = null;
                        grdWeeklyAttendance.DataBind();
                        dvNodata.Style["display"] = "none";
                        lblGrdNodata.Text = "";
                    }
                    else
                    {
                        grdAttandence.DataSource = null;
                        grdAttandence.DataBind();
                        grdWeeklyAttendance.DataSource = null;
                        grdWeeklyAttendance.DataBind();
                        dvNodata.Style["display"] = "block";
                        lblGrdNodata.Text = "No data found";
                    }
                }
                else if (ddlReportType.SelectedValue == "1")
                {

                    ViewState["TodayDate1"] = ViewState["CurrentWeek"];
                    DateTime startWeek = Convert.ToDateTime(ViewState["CurrentWeek"]);
                    DateTime EndWeek = Convert.ToDateTime(ViewState["CrntWkEnd"]);

                    hdnWeeklyStartDt.Value = startWeek.ToString();
                    if (GeneralFunction.GetFirstDayOfWeekDate(EndWeek).ToString("MM/dd/yyyy") == GeneralFunction.GetFirstDayOfWeekDate(DateTime.Now).ToString("MM/dd/yyyy"))
                    {
                        btnNext.CssClass = "btn btn-danger btn-small disabled";
                        btnNext.Enabled = false;
                    }
                    else
                    {
                        btnNext.CssClass = "btn btn-danger btn-small enabled";
                        btnNext.Enabled = true;

                    }

                    lblReport.Text = "Report type";
                    ddlReportType.Visible = true;
                    lblReport.Visible = true;

//.........这里部分代码省略.........
开发者ID:hugo-mirad,项目名称:test-hr-live,代码行数:101,代码来源:Reports.aspx.cs

示例12: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["IsAdmin"] != null && Session["UserID"] != null)
            {

                if (!IsPostBack)
                {
                    comanyname.Text = CommonFiles.ComapnyName;
                    string timezone = "";
                    if (Convert.ToInt32(Session["TimeZoneID"]) == 2)
                    {
                        timezone = "Eastern Standard Time";
                    }
                    else
                    {
                        timezone = "India Standard Time";
                    }
                    DateTime ISTTime = TimeZoneInfo.ConvertTime(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById(timezone));
                    var CurentDatetime = ISTTime;
                    lblDate2.Text = CurentDatetime.ToString("dddd MMMM dd yyyy, hh:mm:ss tt ");
                    lblTimeZoneName.Text = Session["TimeZoneName"].ToString().Trim();
                    lblHeadSchedule.Text = Session["ScheduleInOut"].ToString();
                    lblEmployyName.Text = Session["EmpName"].ToString().Trim();
                    Photo.Src = Session["Photo"].ToString().Trim();
                    lblLocation.Text = Session["LocationName"].ToString();
                    lblShiftName.Text = "-" + Session["ShiftName"].ToString();
                    GetShifts(lblLocation.Text.ToString());
                    ddlShift.SelectedIndex = ddlShift.Items.IndexOf(ddlShift.Items.FindByValue(Session["ShiftID"].ToString()));
                    DateTime TodayDate = Convert.ToDateTime(Session["TodayBannerDate"]);
                    getLocations();
                    ddlLocation.SelectedIndex = ddlLocation.Items.IndexOf(ddlLocation.Items.FindByText(lblLocation.Text.Trim()));
                    if (Session["IsAdmin"].ToString() == "True")
                    {
                        ddlLocation.Enabled = true;
                    }
                    else
                    {
                        ddlLocation.Enabled = false;
                    }

                    Report obj = new Report();
                    DataSet ds=obj.GetFinalPayrollDate(Convert.ToInt32(ddlLocation.SelectedItem.Value));
                    if (ds.Tables.Count > 0)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            DateTime StartDate = Convert.ToDateTime(ds.Tables[0].Rows[0]["FinalMonth"].ToString()+ "/01/" + ds.Tables[0].Rows[0]["FinalYear"].ToString());
                            ViewState["PaidStartDate"] = StartDate.ToString("MM/dd/yyyy");
                            ViewState["CurrentStDt"] = StartDate.ToString("MM/dd/yyyy");
                            DateTime EndDate = StartDate.AddMonths(1).AddSeconds(-1);
                            ViewState["PaidEndDate"] = EndDate.ToString("MM/dd/yyyy");
                            ViewState["CurrentEndDt"] = EndDate.ToString("MM/dd/yyyy");

                            GetpaidLeavesData(Convert.ToInt32(ddlLocation.SelectedItem.Value), StartDate, EndDate,Convert.ToInt32(ddlShift.SelectedValue));
                            if (StartDate.ToString("MM/dd/yyyy") == Convert.ToDateTime(ViewState["CurrentStDt"]).ToString("MM/dd/yyyy"))
                            {
                                btnNext.CssClass = "btn btn-danger btn-small disabled";
                                btnNext.Enabled = false;
                            }
                            else
                            {
                                btnNext.CssClass = "btn btn-danger btn-small enabled";
                                btnNext.Enabled = true;
                            }
                        }
                        else
                        {
                            lblNodata.Visible = true;
                            dvlblNodata.Style["display"] = "block";
                            lblNodata.Text = "No data found";
                            lblTotal.Text = "";
                            grdUsers.DataSource = null;
                            grdUsers.DataBind();
                        }
                    }
                    else
                    {
                        lblNodata.Visible = true;
                        dvlblNodata.Style["display"] = "block";
                        lblNodata.Text = "No data found";
                        lblTotal.Text = "";
                        grdUsers.DataSource = null;
                        grdUsers.DataBind();
                    }
                }
            }
            else
            {
                Response.Redirect("Default.aspx");
            }
        }
开发者ID:hugo-mirad,项目名称:test-hr-live,代码行数:91,代码来源:LeaveManagement.aspx.cs

示例13: ddlShift_SelectedIndexChanged

        protected void ddlShift_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ViewState["PaidStartDate"] == null)
                {
                    Report obj = new Report();
                    DataSet ds = obj.GetFinalPayrollDate(Convert.ToInt32(ddlLocation.SelectedItem.Value));
                    if (ds.Tables.Count > 0)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            DateTime StartDate = Convert.ToDateTime(ds.Tables[0].Rows[0]["FinalMonth"].ToString() + "/01/" + ds.Tables[0].Rows[0]["FinalYear"].ToString());
                            ViewState["PaidStartDate"] = StartDate.ToString("MM/dd/yyyy");
                            ViewState["CurrentStDt"] = StartDate.ToString("MM/dd/yyyy");
                            DateTime EndDate = StartDate.AddMonths(1).AddSeconds(-1);
                            ViewState["PaidEndDate"] = EndDate.ToString("MM/dd/yyyy");
                            ViewState["CurrentEndDt"] = EndDate.ToString("MM/dd/yyyy");

                            GetpaidLeavesData(Convert.ToInt32(ddlLocation.SelectedItem.Value), StartDate, EndDate, Convert.ToInt32(ddlShift.SelectedValue));
                            if (StartDate.ToString("MM/dd/yyyy") == Convert.ToDateTime(ViewState["CurrentStDt"]).ToString("MM/dd/yyyy"))
                            {
                                btnNext.CssClass = "btn btn-danger btn-small disabled";
                                btnNext.Enabled = false;
                            }
                            else
                            {
                                btnNext.CssClass = "btn btn-danger btn-small enabled";
                                btnNext.Enabled = true;
                            }
                        }
                    }
                }

                else
                {

                    DateTime StartDate = Convert.ToDateTime(ViewState["PaidStartDate"]);
                    DateTime EndDate = Convert.ToDateTime(ViewState["PaidEndDate"]);
                    GetpaidLeavesData(Convert.ToInt32(ddlLocation.SelectedItem.Value), StartDate, EndDate, Convert.ToInt32(ddlShift.SelectedValue));
                }
            }
            catch (Exception ex)
            {
            }
        }
开发者ID:hugo-mirad,项目名称:test-hr-live,代码行数:46,代码来源:LeaveManagement.aspx.cs

示例14: GetEditHistory

 private void GetEditHistory(DateTime startDate, DateTime Enddate)
 {
     Attendance.BAL.Report obj = new Report();
     DataSet ds = obj.GetPayrollEdithistory(startDate, Enddate);
     Session["EditHistory"] = ds;
     // lblWeekPayrollReport.Text = "( " + StartDate.ToString("MM/dd/yyyy") + " - " + EndTime.ToString("MM/dd/yyyy") + " )";
     //grdPayRoll.DataSource = ds.Tables[0];
     //grdPayRoll.DataBind();
 }
开发者ID:kamaelyoung,项目名称:HR.bizstrides,代码行数:9,代码来源:PayRoll.aspx.cs

示例15: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["LocationName"] != null)
            {

                if (!IsPostBack)
                {
                    comanyname.Text = CommonFiles.ComapnyName;
                    string timezone = "";
                    if (Convert.ToInt32(Session["TimeZoneID"]) == 2)
                    {
                        timezone = "Eastern Standard Time";
                    }
                    else
                    {
                        timezone = "India Standard Time";

                    }
                    DateTime ISTTime = TimeZoneInfo.ConvertTime(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById(timezone));

                    var CurentDatetime = ISTTime;

                    lblDate2.Text = CurentDatetime.ToString("dddd MMMM dd yyyy, hh:mm:ss tt ");
                    lblTimeZoneName.Text = Session["TimeZoneName"].ToString().Trim();
                    lblHeadSchedule.Text = Session["ScheduleInOut"].ToString();
                    lblEmployyName.Text = Session["EmpName"].ToString().Trim();
                    Photo.Src = Session["Photo"].ToString().Trim();
                    lblLocation.Text = Session["LocationName"].ToString();
                    DateTime TodayDate = Convert.ToDateTime(Session["TodayBannerDate"]);


                    DateTime StartDate = GeneralFunction.GetFirstDayOfWeekDate(TodayDate);
                    DateTime EndDate = StartDate.AddDays(-14);

                    ViewState["StartRptDt"] = EndDate;
                    ViewState["EndRptDt"] = StartDate.AddDays(-1);


                    txtToDate.Text = StartDate.AddDays(-1).ToString("MM/dd/yyyy");
                    txtFromDate.Text = EndDate.ToString("MM/dd/yyyy");

                    int userid = Convert.ToInt32(Session["UserID"]);


                    Attendance.BAL.Report obj = new Report();
                    DateTime Count = obj.GetFreezedDate(EndDate, Session["LocationName"].ToString());
                    if (Count.ToString("MM/dd/yyyy") != "01/01/1900")
                    {
                        lblFreeze.Text = "";
                    }
                    else
                    {
                        lblFreeze.Text = "This is tentative attendance report.Some or part of the attendance not yet freezed";
                    }


                    GetReport(EndDate, StartDate.AddDays(-1), userid);
                    BindListOfNewEmployee();
                    BindListofChanges();

                }
            }
            else
            {
                Response.Redirect("Default.aspx");
            }

        }
开发者ID:kamaelyoung,项目名称:HR.bizstrides,代码行数:68,代码来源:PayRoll.aspx.cs


注:本文中的Attendance.BAL.Report类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。