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


C# Report.GetFinalPayrollDate方法代码示例

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


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

示例1: 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

示例2: 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


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