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


C# LoginGateway.LoadByLoginId方法代码示例

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


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

示例1: GetAllNotes

        /// <summary>
        /// GetAllNotes. 
        /// </summary>
        /// <param name="materialId">materialId</param>
        /// <param name="companyId">COMPANY_UD</param>
        /// <param name="numberOfNotes">numberOfNotes</param>
        /// <param name="enterString">enterString</param>
        /// <returns>a string with all comments at history separeted with  the enterString</returns>
        public string GetAllNotes(int materialId, int companyId, int numberOfNotes, string enterString)
        {
            string note = "";

            foreach (MaterialsInformationTDS.NoteInformationRow row in (MaterialsInformationTDS.NoteInformationDataTable)Table)
            {
                if ((row.MaterialID == materialId) && (row.COMPANY_ID == companyId))
                {
                    // ... Get user name
                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(row.UserID, row.COMPANY_ID);
                    string user = loginGateway.GetLastName(row.UserID, row.COMPANY_ID) + " " + loginGateway.GetFirstName(row.UserID, row.COMPANY_ID);

                    // ... Form the comment string
                    note = note + row.DateTime_ + "  ( " + user.Trim() + " )" + enterString + row.Note;
                }

                // Insert enter when correspond
                if (numberOfNotes > 1)
                {
                    note = note + enterString + enterString;
                    numberOfNotes--;
                }
            }
            return (note);
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:34,代码来源:MaterialsInformationNoteInformation.cs

示例2: Generate

        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;

            SubcontractorHoursNavigatorTDS subcontractorHoursNavigatorTDS = (SubcontractorHoursNavigatorTDS)Session["subcontractorHoursNavigatorTDS"];
            LiquiForce.LFSLive.BL.LabourHours.SubcontractorHours.SubcontractorHoursNavigator subcontractorHoursNavigator = new LiquiForce.LFSLive.BL.LabourHours.SubcontractorHours.SubcontractorHoursNavigator(subcontractorHoursNavigatorTDS);

            // ... Set properties to master page
            master.Data = subcontractorHoursNavigator.Data;
            master.Table = subcontractorHoursNavigator.TableName;

            if (subcontractorHoursNavigator.Table.Rows.Count > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new LiquiForce.LFSLive.WebUI.LabourHours.SubcontractorHours.SubcontractorHoursPrintSearchResultsReport();

                    LoginGateway loginGateway = new LoginGateway();
                    int loginId = Convert.ToInt32(Session["loginID"]);
                    int companyId = Convert.ToInt32(Session["companyID"]);

                    loginGateway.LoadByLoginId(loginId, companyId);
                    string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                    master.SetParameter("User", user.Trim());

                    // Report format
                    master.Report.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
                    master.Report.PrintOptions.PaperSize = PaperSize.PaperLegal;
                }
                else
                {
                    master.Report = new LiquiForce.LFSLive.WebUI.LabourHours.SubcontractorHours.SubcontractorHoursPrintSearchResultsReportExport();
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:35,代码来源:subcontractor_hours_print_search_results_report.aspx.cs

示例3: Generate

        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;

            // Get Data
            PlLiningPlanTDS prLiningPlanTDS = (PlLiningPlanTDS)Session["prLiningPlanTDS"];
            PrLiningPlan prLiningPlan = new PrLiningPlan();
            prLiningPlan.ProcessForReport(prLiningPlanTDS);

            // ... set properties to master page
            master.Data = prLiningPlan.Data;
            master.Table = prLiningPlan.TableName;

            // Get report
            if (prLiningPlan.Table.Rows.Count > 0)
            {
                master.Report = new PrLiningPlanReport();
                int loginId = Convert.ToInt32(Session["loginID"]);
                int companyId = Convert.ToInt32(Session["companyID"]);

                LoginGateway loginGateway = new LoginGateway();
                loginGateway.LoadByLoginId(loginId, companyId);
                string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                master.SetParameter("User", user.Trim());

                master.SetParameter("name", Request.QueryString["name"]);
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:28,代码来源:pr_lining_plan_report.aspx.cs

示例4: Generate

        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;

            RevenueNavigatorTDS revenueNavigatorTDS = (RevenueNavigatorTDS)Session["revenueNavigatorTDS"];
            LiquiForce.LFSLive.BL.Projects.Revenue.RevenueNavigator revenueNavigator = new LiquiForce.LFSLive.BL.Projects.Revenue.RevenueNavigator(revenueNavigatorTDS);

            // ... Set properties to master page
            master.Data = revenueNavigator.Data;
            master.Table = revenueNavigator.TableName;

            if (revenueNavigator.Table.Rows.Count > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new LiquiForce.LFSLive.WebUI.Projects.Revenue.RevenuePrintSearchResultsReport();

                    // ... Parameters
                    int j;
                    for (int i = 0; i < int.Parse(Request.QueryString["totalColumnsPreview"]); i++)
                    {
                        j = i + 1;

                        master.SetParameter("header" + j, Request.QueryString["header" + j]);
                    }

                    master.SetParameter("headerComments", Request.QueryString["comments"]);
                    master.SetParameter("Title", Request.QueryString["title"]);

                    int loginId = Convert.ToInt32(Session["loginID"]);
                    int companyId = Convert.ToInt32(Session["companyID"]);

                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(loginId, companyId);
                    string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                    master.SetParameter("User", user.Trim());

                    // Report format
                    master.Report.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
                    master.Report.PrintOptions.PaperSize = PaperSize.PaperLegal;
                }
                else
                {
                    master.Report = new LiquiForce.LFSLive.WebUI.Projects.Revenue.RevenuePrintSearchResultsReportExport();

                    // ... Parameters
                    int j;
                    for (int i = 0; i < int.Parse(Request.QueryString["totalColumnsExport"]); i++)
                    {
                        j = i + 1;

                        master.SetParameter("header" + j, Request.QueryString["header" + j]);
                    }
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:56,代码来源:revenue_print_search_results_report.aspx.cs

示例5: Page_Load

        // ////////////////////////////////////////////////////////////////////////
        // EVENTS
        //
        protected void Page_Load(object sender, EventArgs e)
        {
            // Get user data
            int loginId = Convert.ToInt32(Session["loginID"]);
            int companyId = Int32.Parse(Session["companyID"].ToString());

            LoginGateway loginGateway = new LoginGateway(new DataSet());
            loginGateway.LoadByLoginId(loginId, companyId);

            string userName = loginGateway.GetUserName(loginId, companyId);
            string userMail = loginGateway.GetEmail(loginId, companyId);
            string password = loginGateway.GetPassword(loginId, companyId);

            // Fomat new pass
            string newPassword = password;
            if (password.Length <= 7)
            {
                for (int i = password.Length; i <= 7; i++)
                {
                    newPassword = newPassword + "!";
                }
            }
            else
            {
                newPassword = newPassword + "!";
            }

            // Verify pass, if not a valid user create one
            if (!(Membership.ValidateUser(userName, newPassword)))
            {
                MembershipCreateStatus createStatus;
                Membership.CreateUser(userName, newPassword, userMail, "Password question", "password answer", true, out createStatus);
            }

            FormsAuthentication.RedirectFromLoginPage(userName, false);

            if (Convert.ToBoolean(Session["sgLFS_ITTST_SUPPORTTICKET_ADMIN"]))
            {
                Response.Redirect(".//dashboardManager.aspx?source_page=out");
            }
            else
            {
                Response.Redirect(".//dashboard.aspx?source_page=out");
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:48,代码来源:dashboard_login.aspx.cs

示例6: GrdCommentsAdd

        private void GrdCommentsAdd()
        {
            if (ValidateCommentsFooter())
            {
                Page.Validate("commentsDataAdd");
                if (Page.IsValid)
                {
                    int workId = Int32.Parse(hdfWorkId.Value);
                    int workIdFll = Int32.Parse(hdfWorkIdFll.Value.Trim());
                    int companyId = Int32.Parse(hdfCompanyId.Value);
                    int loginId = Convert.ToInt32(Session["loginID"]);
                    DateTime dateTime_ = DateTime.Now;
                    bool inDatabase = false;
                    bool toHistory = false;
                    bool deleted = false;
                    string workType = hdfWorkType.Value;

                    string newSubject = ((TextBox)grdComments.FooterRow.FindControl("tbxSubjectNew")).Text.Trim();
                    string newType = ((DropDownList)grdComments.FooterRow.FindControl("ddlTypeNew")).SelectedValue.ToString().Trim();
                    string newComment = ((TextBox)grdComments.FooterRow.FindControl("tbxCommentsNew")).Text.Trim();
                    int? libraryFilesId = null; if (((Label)grdComments.FooterRow.FindControl("lblLIBRARY_FILES_IDNew")).Text != "") libraryFilesId = Int32.Parse(((Label)grdComments.FooterRow.FindControl("lblLIBRARY_FILES_IDNew")).Text.Trim());

                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(loginId, companyId);
                    string userFullName = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);

                    if (newType == "Rehab Assessment")
                    {
                        RehabAssessmentCommentDetails model = new RehabAssessmentCommentDetails(rehabAssessmentTDS);
                        model.Insert(workId, newType, newSubject, loginId, dateTime_, newComment, libraryFilesId, deleted, companyId, inDatabase, userFullName, toHistory, workType);
                    }
                    else
                    {
                        if (workIdFll != 0)
                        {
                            RehabAssessmentCommentDetails model = new RehabAssessmentCommentDetails(rehabAssessmentTDS);
                            model.Insert(workIdFll, newType, newSubject, loginId, dateTime_, newComment, libraryFilesId, deleted, companyId, inDatabase, userFullName, toHistory, workType);
                        }
                    }

                    Session.Remove("rehabAssessmentCommentDetailsDummy");
                    Session["rehabAssessmentTDS"] = rehabAssessmentTDS;
                    Session["rehabAssessmentCommentDetails"] = rehabAssessmentTDS.CommentDetails;

                    grdComments.DataBind();
                    grdComments.PageIndex = grdComments.PageCount - 1;
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:49,代码来源:ra_comments.aspx.cs

示例7: Generate

        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;

            // Get Data
            LiquiForce.LFSLive.BL.CWP.FullLengthLining.FlOutstandingInvestigationIssuesReport flOutstandingInvestigationIssuesReport = new LiquiForce.LFSLive.BL.CWP.FullLengthLining.FlOutstandingInvestigationIssuesReport();

            if (ddlClient.SelectedValue == "-1")
            {
                flOutstandingInvestigationIssuesReport.Load(int.Parse(hdfCompanyId.Value));
            }
            else
            {
                if (ddlProject.SelectedValue == "-1")
                {
                    flOutstandingInvestigationIssuesReport.LoadByCompaniesId(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue));
                }
                else
                {
                    flOutstandingInvestigationIssuesReport.LoadByCompaniesIdProjectId(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue));
                }
            }

            // ... set properties to master page
            master.Data = flOutstandingInvestigationIssuesReport.Data;
            master.Table = flOutstandingInvestigationIssuesReport.TableName;

            // Get report
            if (flOutstandingInvestigationIssuesReport.Table.Rows.Count > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new FlOutstandingInvestigationIssuesReport();
                }
                else
                {
                    master.Report = new FlOutstandingInvestigationIssuesReportExport();
                }

                // ... set parameters to report
                int companyId = Convert.ToInt32(Session["companyID"]);
                if (master.Format == "pdf")
                {
                    if (ddlClient.SelectedValue != "-1")
                    {
                        // ... for client
                        int currentClientId = Int32.Parse(ddlClient.SelectedValue);
                        CompaniesGateway companiesGateway = new CompaniesGateway();
                        companiesGateway.LoadByCompaniesId(currentClientId, companyId);
                        master.SetParameter("Client", companiesGateway.GetName(currentClientId));
                    }
                    else
                    {
                        master.SetParameter("Client", "All");
                    }

                    if (ddlProject.SelectedValue != "-1")
                    {
                        // ... for project
                        int currentProjectId = Int32.Parse(ddlProject.SelectedValue);
                        ProjectGateway projectGateway = new ProjectGateway();
                        projectGateway.LoadByProjectId(currentProjectId);
                        string name = projectGateway.GetName(currentProjectId);
                        master.SetParameter("Project", name);
                    }
                    else
                    {
                        master.SetParameter("Project", "All");
                    }

                    int loginId = Convert.ToInt32(Session["loginID"]);

                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(loginId, companyId);
                    string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                    master.SetParameter("User", user.Trim());
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:79,代码来源:fl_outstanding_investigation_issues_report.aspx.cs

示例8: UpdateForProcess

        /// <summary>
        /// UpdateForProcess. Update the author of each comment
        /// </summary>
        public void UpdateForProcess()
        {
            LoginGateway loginGateway = new LoginGateway();

            foreach (FlatSectionJlTDS.FlatSectionJlHistoryDetailsRow row in (FlatSectionJlTDS.FlatSectionJlHistoryDetailsDataTable)Table)
            {
                loginGateway.LoadByLoginId(row.UserID, row.COMPANY_ID);
                row.UserFullName = loginGateway.GetLastName(row.UserID, row.COMPANY_ID) + " " + loginGateway.GetFirstName(row.UserID, row.COMPANY_ID);
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:13,代码来源:FlatSectionJlHistoryDetails.cs

示例9: Generate

        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;
            int companyId = Convert.ToInt32(Session["companyID"]);

            ProjectCostingSheetInformationReportInformation projectCostingSheetInformationReportInformation = new ProjectCostingSheetInformationReportInformation();

            if (ddlClient.SelectedValue == "-1")
            {
                projectCostingSheetInformationReportInformation.Load(companyId);
            }
            else
            {
                if (ddlProject.SelectedValue == "-1")
                {
                    projectCostingSheetInformationReportInformation.LoadByCompaniesId(Int32.Parse(ddlClient.SelectedValue), companyId);
                }
                else
                {
                    projectCostingSheetInformationReportInformation.LoadByCompaniesIdProjectId(Int32.Parse(ddlClient.SelectedValue), Int32.Parse(ddlProject.SelectedValue), companyId);
                }
            }

            // ... set properties to master page
            master.Data = projectCostingSheetInformationReportInformation.Data;
            master.Table = projectCostingSheetInformationReportInformation.TableName;

            // Get report
            if (projectCostingSheetInformationReportInformation.Table.Rows.Count > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new ConsolidatedCostingSheetReport();
                    int loginId = Convert.ToInt32(Session["loginID"]);

                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(loginId, companyId);
                    string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                    master.SetParameter("User", user.Trim());

                    // For process code
                    ProjectCostingSheetInformationReportInformationGateway projectCostingSheetInformationReportInformationGateway = new ProjectCostingSheetInformationReportInformationGateway(projectCostingSheetInformationReportInformation.Data);

                    // ... ... client
                    if (ddlClient.SelectedValue == "-1")
                    {
                        master.SetParameter("client", "All");
                    }
                    else
                    {
                        CompaniesGateway companiesGateway = new CompaniesGateway();
                        companiesGateway.LoadByCompaniesId(Int32.Parse(ddlClient.SelectedValue), Int32.Parse(hdfCompanyId.Value));
                        string clientName = companiesGateway.GetName(Int32.Parse(ddlClient.SelectedValue));
                        master.SetParameter("client", clientName);
                    }

                    // ... ... project
                    if (ddlProject.SelectedValue == "-1")
                    {
                        master.SetParameter("project", "All");
                    }
                    else
                    {
                        int projectId2 = Int32.Parse(ddlProject.SelectedValue);
                        ProjectGateway projectGateway = new ProjectGateway();
                        projectGateway.LoadByProjectId(projectId2);
                        string project = projectGateway.GetName(projectId2);
                        master.SetParameter("project", project);
                    }
                }
                else
                {
                    master.Report = new ConsolidatedCostingSheetPreviewReport();
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:76,代码来源:costing_sheet_report_consolidated.aspx.cs

示例10: Generate2


//.........这里部分代码省略.........
                    if (cbxSectionId.Checked)
                    {
                        ArrayList sectionsId = new ArrayList();
                        foreach (ListItem lst in cbxlSectionId.Items)
                        {
                            if (lst.Selected)
                            {
                                sectionsId.Add(lst.Value);
                            }
                        }

                        flM2Report.LoadByCompaniesIdProjectIdSectionId(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), unitType, sectionsId);
                    }
                    else
                    {
                        if (cbxDate.Checked)
                        {
                            DateTime m1Date = DateTime.Parse(tkrdpDate.SelectedDate.Value.ToShortDateString());
                            flM2Report.LoadByCompaniesIdProjectIdDate(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), unitType, m1Date.ToShortDateString());
                        }
                        else
                        {
                            if (cbxStreet.Checked)
                            {
                                flM2Report.LoadByCompaniesIdProjectIdStreet(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), unitType, tbxStreet.Text.Trim());
                            }
                            else
                            {
                                if (cbxSubArea.Checked)
                                {
                                    flM2Report.LoadByCompaniesIdProjectIdSubArea(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), unitType, tbxSubArea.Text.Trim());
                                }
                                else
                                {
                                    flM2Report.LoadByCompaniesIdProjectId(int.Parse(hdfCompanyId.Value), int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), unitType);
                                }
                            }
                        }
                    }
                }
            }

            // ... set properties to master page
            master.Data2 = flM2Report.Data;
            master.Table2 = flM2Report.TableName;

            // Get report
            if (flM2Report.Table.Rows.Count > 0)
            {
                if (master.Format2 == "pdf")
                {
                    master.Report2 = new FlM2Report();
                }
                else
                {
                    master.Report2 = new FlM2ReportExport();
                }

                // ... set parameters to report
                int companyId = Convert.ToInt32(Session["companyID"]);
                if (master.Format2 == "pdf")
                {
                    if (ddlClient.SelectedValue != "-1")
                    {
                        // ... for client
                        int currentCompanyId = Int32.Parse(ddlClient.SelectedValue);
                        CompaniesGateway companiesGateway = new CompaniesGateway();
                        companiesGateway.LoadByCompaniesId(currentCompanyId, companyId);
                        master.SetParameter2("Client", companiesGateway.GetName(currentCompanyId));
                    }
                    else
                    {
                        master.SetParameter2("Client", "All");
                    }

                    if (ddlProject.SelectedValue != "-1")
                    {
                        // ... for project
                        int currentProjectId = Int32.Parse(ddlProject.SelectedValue);
                        ProjectGateway projectGateway = new ProjectGateway();
                        projectGateway.LoadByProjectId(currentProjectId);
                        string name = projectGateway.GetName(currentProjectId);
                        master.SetParameter2("Project", name);
                    }
                    else
                    {
                        master.SetParameter2("Project", "All");
                    }

                    master.SetParameter2("UnitType", unitType);

                    int loginId = Convert.ToInt32(Session["loginID"]);

                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(loginId, companyId);
                    string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                    master.SetParameter2("User", user.Trim());
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:fl_m12_report.aspx.cs

示例11: GetAllHistory

        /// <summary>
        /// GetAllHistory. 
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="refId">refId</param>
        /// <param name="companyId">companyId</param>
        /// <param name="numberOfComments">numberOfComments</param>
        /// <param name="enterString">enterString</param>
        /// <returns>a string with all comments at history separeted with  the enterString</returns>
        public string GetAllHistory(Guid id, int refId, int companyId, int numberOfComments, string enterString)
        {
            string history = "";

            foreach (SectionTDS.LFS_JUNCTION_LINER2_HISTORYRow row in (SectionTDS.LFS_JUNCTION_LINER2_HISTORYDataTable)Table)
            {
                if ((row.ID == id) && (row.RefID == refId) && (row.COMPANY_ID == companyId))
                {
                    // ... Get user name
                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(row.LoginID, row.COMPANY_ID);
                    string user = loginGateway.GetLastName(row.LoginID, row.COMPANY_ID) + " " + loginGateway.GetFirstName(row.LoginID, row.COMPANY_ID);

                    // ... Form the comment string
                    history = history + row.DateTime_ + "  ( " + user.Trim() + " )" + enterString + row.History;
                }

                // Insert enter when correspond
                if (numberOfComments > 1)
                {
                    history = history + enterString + enterString;
                    numberOfComments--;
                }
            }
            return (history);
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:35,代码来源:JlinerHistory.cs

示例12: Generate

        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;

            // Get Data
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int loginId = Convert.ToInt32(Session["loginID"]);
            EmployeeGateway employeeGateway = new EmployeeGateway(new DataSet());
            int employeeId = employeeGateway.GetEmployeIdByLoginId(loginId);

            LiquiForce.LFSLive.BL.FleetManagement.ToDoList.ToDoListToDoAssignedToMeReport toDoListToDoAssignedToMeReport = new LiquiForce.LFSLive.BL.FleetManagement.ToDoList.ToDoListToDoAssignedToMeReport();

            // could see all to do lists
            toDoListToDoAssignedToMeReport.LoadToDoAssignedToMeByEmployeeId(employeeId, companyId);

            toDoListToDoAssignedToMeReport.Table.AcceptChanges();

            // ... set properties to master page
            master.Data = toDoListToDoAssignedToMeReport.Data;
            master.Table = toDoListToDoAssignedToMeReport.TableName;

            // Get report
            if (toDoListToDoAssignedToMeReport.Table.Rows.Count > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new ToDoListToDoAssignedToMeReport();
                }
                else
                {
                    master.Report = new ToDoListToDoAssignedToMeReportExport();
                }

                // ... set parameters to report
                if (master.Format == "pdf")
                {
                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(loginId, companyId);
                    string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                    master.SetParameter("User", user.Trim());
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:43,代码来源:toDoList_AssignedToMe_report.aspx.cs

示例13: Generate


//.........这里部分代码省略.........
                        mrSummaryReport.LoadByAssetId(companyId, assetId);
                    }
                }

                // For specific client
                else
                {
                    // For all projects
                    if (ddlProject.SelectedValue == "-1")
                    {
                        if (cbxMhId.Checked)
                        {
                            ArrayList assetId = new ArrayList();
                            foreach (ListItem lst in cbxlMhId.Items)
                            {
                                if (lst.Selected)
                                {
                                    assetId.Add(lst.Value);
                                }
                            }

                            mrSummaryReport.LoadByCompaniesIdAssetId(companyId, int.Parse(ddlClient.SelectedValue), assetId);
                        }
                    }
                    // For specific project
                    else
                    {
                        if (cbxMhId.Checked)
                        {
                            ArrayList assetId = new ArrayList();
                            foreach (ListItem lst in cbxlMhId.Items)
                            {
                                if (lst.Selected)
                                {
                                    assetId.Add(lst.Value);
                                }
                            }

                            mrSummaryReport.LoadByCompaniesIdProjectIdAssetId(companyId, int.Parse(ddlClient.SelectedValue), int.Parse(ddlProject.SelectedValue), assetId);
                        }
                    }
                }
            }

            // ... set properties to master page
            master.Data = mrSummaryReport.Data;
            master.Table = mrSummaryReport.TableName;

            // Get report
            if (mrSummaryReport.Table.Rows.Count > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new MrSummaryReport();
                }
                else
                {
                    master.Report = new MrSummaryReportExport();
                }

                // ... set parameters to report
                if (master.Format == "pdf")
                {
                    if (ddlClient.SelectedValue != "-1")
                    {
                        // ... for client
                        int currentClientId = Int32.Parse(ddlClient.SelectedValue);

                        CompaniesGateway companiesGateway = new CompaniesGateway();
                        companiesGateway.LoadByCompaniesId(currentClientId, companyId);
                        master.SetParameter("Client", companiesGateway.GetName(currentClientId));
                    }
                    else
                    {
                        master.SetParameter("Client", "All");
                    }

                    if (ddlProject.SelectedValue != "-1")
                    {
                        // ... for project
                        int currentProjectId = Int32.Parse(ddlProject.SelectedValue);
                        ProjectGateway projectGateway = new ProjectGateway();
                        projectGateway.LoadByProjectId(currentProjectId);
                        string name = projectGateway.GetName(currentProjectId);
                        master.SetParameter("Project", name);
                    }
                    else
                    {
                        master.SetParameter("Project", "All");
                    }

                    int loginId = Convert.ToInt32(Session["loginID"]);

                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(loginId, companyId);
                    string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                    master.SetParameter("User", user.Trim());
                }
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:mr_summary_report.aspx.cs

示例14: masterParameters

        private void masterParameters(mReport1 master)
        {
            DateTime startDate = DateTime.Parse(tkrdpStartDate.SelectedDate.Value.ToShortDateString());
            DateTime endDate = DateTime.Parse(tkrdpEndDate.SelectedDate.Value.ToShortDateString());
            int companyId = Int32.Parse(hdfCompanyId.Value);

            // ... set parameters to report
            if (master.Format == "pdf")
            {
                // ... ... client
                if (ddlClient.SelectedValue != "-1")
                {
                    int currentClientId = Int32.Parse(ddlClient.SelectedValue);
                    CompaniesGateway companiesGateway = new CompaniesGateway();
                    companiesGateway.LoadByCompaniesId(currentClientId, companyId);
                    master.SetParameter("Client", companiesGateway.GetName(currentClientId));
                }
                else
                {
                    master.SetParameter("Client", "All");
                }

                // ... ...  project
                if (ddlProject.SelectedValue != "-1")
                {
                    int currentProjectId = Int32.Parse(ddlProject.SelectedValue);
                    ProjectGateway projectGateway = new ProjectGateway();
                    projectGateway.LoadByProjectId(currentProjectId);
                    string name = projectGateway.GetName(currentProjectId);
                    master.SetParameter("Project", name);
                }
                else
                {
                    master.SetParameter("Project", "All");
                }

                // ... ... category
                if (ddlCategory.SelectedValue != "-1")
                {
                    string currentCategory = ddlCategory.SelectedValue;
                    master.SetParameter("Category", currentCategory);
                }
                else
                {
                    master.SetParameter("Category", "All");
                }

                // ... ... user
                LoginGateway loginGateway = new LoginGateway();
                loginGateway.LoadByLoginId(Convert.ToInt32(Session["loginID"]), companyId);
                string user = loginGateway.GetLastName(Convert.ToInt32(Session["loginID"]), companyId) + " " + loginGateway.GetFirstName(Convert.ToInt32(Session["loginID"]), companyId);
                master.SetParameter("User", user.Trim());

                // ... for start date
                string startDateParameter = startDate.Month.ToString() + "/" + startDate.Day.ToString() + "/" + startDate.Year.ToString();
                master.SetParameter("StartDate", startDateParameter);

                // ... for end date
                string endDateParameter = endDate.Month.ToString() + "/" + endDate.Day.ToString() + "/" + endDate.Year.ToString();
                master.SetParameter("EndDate", endDateParameter);
            }
        }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:62,代码来源:actual_costs_report.aspx.cs

示例15: Generate

        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;

            // Get Data
            DateTime startDate = DateTime.Parse(tkrdpStartDate.SelectedDate.Value.ToShortDateString());
            DateTime endDate = DateTime.Parse(tkrdpEndDate.SelectedDate.Value.ToShortDateString());
            int companyId = Int32.Parse(hdfCompanyId.Value);
            LiquiForce.LFSLive.BL.Projects.Projects.ProductionReport productionReport = new LiquiForce.LFSLive.BL.Projects.Projects.ProductionReport();

            if (ddlCountry.SelectedValue == "(All)")
            {
                if (ddlClient.SelectedValue == "-1")
                {
                    productionReport.LoadByStartDateEndDate(startDate, endDate, companyId);
                }
                else
                {
                    int clientId = int.Parse(ddlClient.SelectedValue);

                    if (ddlProject.SelectedValue == "-1")
                    {
                        productionReport.LoadByClientIdStartDateEndDate(clientId, startDate, endDate, companyId);
                    }
                    else
                    {
                        int projectId = int.Parse(ddlProject.SelectedValue);
                        productionReport.LoadByClientIdProjectIdStartDateEndDate(clientId, projectId, startDate, endDate, companyId);
                    }
                }
            }
            else
            {
                int country = Int32.Parse(ddlCountry.SelectedValue);

                if (ddlClient.SelectedValue == "-1")
                {
                    productionReport.LoadByCountryIdStartDateEndDate(country, startDate, endDate, companyId);
                }
                else
                {
                    int clientId = int.Parse(ddlClient.SelectedValue);

                    if (ddlProject.SelectedValue == "-1")
                    {
                        productionReport.LoadByCountryIdClientIdStartDateEndDate(country, clientId, startDate, endDate, companyId);
                    }
                    else
                    {
                        int projectId = int.Parse(ddlProject.SelectedValue);
                        productionReport.LoadByCountryIdClientIdProjectIdStartDateEndDate(country, clientId, projectId, startDate, endDate, companyId);
                    }
                }
            }

            LiquiForce.LFSLive.DA.Projects.Projects.ProductionReportGateway productionReportGateway = new LiquiForce.LFSLive.DA.Projects.Projects.ProductionReportGateway(productionReport.Data);

            // ... set properties to master page
            master.Data = productionReportGateway.Data;
            master.Table = productionReportGateway.TableName;

            // Get report
            if (productionReportGateway.Table.Rows.Count > 0)
            {
                if (master.Format == "pdf")
                {
                    master.Report = new LiquiForce.LFSLive.WebUI.Projects.Projects.ProductionReport();
                }
                else
                {
                    master.Report = new LiquiForce.LFSLive.WebUI.Projects.Projects.ProductionReportExport();
                }

                // ... set parameters to report
                if (master.Format == "pdf")
                {
                    // ... ...  user
                    int loginId = Convert.ToInt32(Session["loginID"]);

                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(loginId, companyId);
                    string user = loginGateway.GetLastName(loginId, companyId) + " " + loginGateway.GetFirstName(loginId, companyId);
                    master.SetParameter("User", user.Trim());

                    // ... ... country
                    if (ddlCountry.SelectedValue == "2")
                    {
                        master.SetParameter("Country", "USA");
                    }
                    else
                    {
                        if (ddlCountry.SelectedValue == "1")
                        {
                            master.SetParameter("Country", "Canada");
                        }
                        else
                        {
                            master.SetParameter("Country", "All");
                        }
                    }
//.........这里部分代码省略.........
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:101,代码来源:production_report.aspx.cs


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