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


C# Report.GetLocations方法代码示例

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


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

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

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

示例3: 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();
                //   ddlLocation.Items.Insert(0, new ListItem("Select", "0"));

                ddlPopLoc.DataSource = dt;
                ddlPopLoc.DataTextField = "LocationName";
                ddlPopLoc.DataValueField = "LocationId";
                ddlPopLoc.DataBind();
                ddlPopLoc.Items.Insert(0, new ListItem("Select", "Select"));
                ddlPopLoc.Items.Insert(1, new ListItem("ALL", "0"));

                ddlDefaultlocation.DataSource = dt;
                ddlDefaultlocation.DataTextField = "LocationName";
                ddlDefaultlocation.DataValueField = "LocationId";
                ddlDefaultlocation.DataBind();
                ddlDefaultlocation.Items.Insert(0, new ListItem("Select", "Select"));
                ddlDefaultlocation.Items.Insert(1, new ListItem("ALL", "0"));
            }
            catch (Exception ex)
            {
            }
        }
开发者ID:hugo-mirad,项目名称:test-hr-live,代码行数:30,代码来源:HolidayManagement.aspx.cs


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