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


C# RAF.LoginGateway类代码示例

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


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

示例1: GetJLOrFLOrRAHistory

        /// <summary>
        /// GetFLAndRAHistory. 
        /// </summary>
        /// <param name="companyId">companyId</param>
        /// <param name="numberOfHistory">numberOfHistory</param>
        /// <param name="enterString">enterString</param>
        /// <returns>a string with all historys separeted with  the enterString</returns>
        public string GetJLOrFLOrRAHistory(int companyId, int numberOfHistory, string enterString)
        {
            string history = "";

            foreach (FlatSectionJlTDS.AllHistoryRow row in (FlatSectionJlTDS.AllHistoryDataTable)Table)
            {
                // ... Get user name
                LoginGateway loginGateway = new LoginGateway();
                loginGateway.LoadAllByLoginId(row.UserID, row.COMPANY_ID);
                string user = loginGateway.GetLastName(row.UserID, row.COMPANY_ID) + " " + loginGateway.GetFirstName(row.UserID, row.COMPANY_ID);

                // ... Form the history string
                string rowHistory = ""; if (!row.IsHistoryNull()) rowHistory = row.History; else rowHistory = "( None )";
                history = history + row.DateTime_ + " (" + user.Trim() + ")";
                if (!row.IsWorkTypeNull()) history = history + ", Created At: " + row.WorkType;
                history = history + ", Type: " + row.Type;
                history = history + ", Subject: " + row.Subject + enterString;
                history = history + "Comment: " + rowHistory;

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

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

示例3: GetAllRehabAssessmentComments

        /// <summary>
        /// GetAllRehabAssessmentComments. 
        /// </summary>
        /// <param name="workId">workId</param>
        /// <param name="companyId">companyId</param>
        /// <param name="numberOfComments">numberOfComments</param>
        /// <param name="enterString">enterString</param>
        /// <returns>a string with all comments separeted with  the enterString</returns>
        public string GetAllRehabAssessmentComments(int workId, int companyId, int numberOfComments, string enterString)
        {
            string comment = "";

            foreach (RehabAssessmentTDS.CommentDetailsRow row in (RehabAssessmentTDS.CommentDetailsDataTable)Table)
            {
                if ((row.WorkID == workId) && (row.COMPANY_ID == companyId) && (!row.Deleted))
                {
                    // ... Get user name
                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadAllByLoginId(row.UserID, companyId);
                    string user = loginGateway.GetLastName(row.UserID, companyId) + " " + loginGateway.GetFirstName(row.UserID, companyId);

                    // ... Form the comment string
                    string rowComment = ""; if (!row.IsCommentNull()) rowComment = row.Comment; else rowComment = "( None )";
                    comment = comment + row.DateTime_ + " (" + user.Trim() + ")";
                    if (!row.IsWorkTypeNull()) comment = comment + ", Created At: " + row.WorkType;
                    comment = comment + ", Type: " + row.Type ;
                    comment = comment + ", Subject: " + row.Subject + enterString;
                    comment = comment + "Comment: " + rowComment;
                }

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

示例4: 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 (FlatSectionJlinerTDS.JuntionLiner2HistoryRow row in (FlatSectionJlinerTDS.JuntionLiner2HistoryDataTable)Table)
            {
                if ((row.ID == id) && (row.RefID == refId) && (row.COMPANY_ID == companyId))
                {
                    // ... Get user name
                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadByLoginId(row.LoginID, companyId);
                    string user = loginGateway.GetLastName(row.LoginID, companyId) + " " + loginGateway.GetFirstName(row.LoginID, companyId);

                    // ... 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,代码来源:FlatSectionJlinerJuntionLiner2History.cs

示例5: GetFLOrRAComments

        /// <summary>
        /// GetFLAndRAComments. 
        /// </summary>
        /// <param name="companyId">companyId</param>
        /// <param name="numberOfComments">numberOfComments</param>
        /// <param name="enterString">enterString</param>
        /// <returns>a string with all comments separeted with  the enterString</returns>
        public string GetFLOrRAComments(int companyId, int numberOfComments, string enterString)
        {
            string comment = "";

            foreach (FullLengthLiningTDS.AllCommentsRow row in (FullLengthLiningTDS.AllCommentsDataTable)Table)
            {
                // ... Get user name
                LoginGateway loginGateway = new LoginGateway();
                loginGateway.LoadAllByLoginId(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
                string rowComment = ""; if (!row.IsCommentNull()) rowComment = row.Comment; else rowComment = "( None )";
                comment = comment + row.DateTime_ + " (" + user.Trim() + ")";
                if (!row.IsWorkTypeNull()) comment = comment + ", Created At: " + row.WorkType;
                comment = comment + ", Type: " + row.Type;
                comment = comment + ", Subject: " + row.Subject + enterString;
                comment = comment + "Comment: " + rowComment;

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

示例6: GetAllProjectNotes

        /// <summary>
        /// GetAllProjectNotes. 
        /// </summary>
        /// <param name="projectId">projectId</param>
        /// <param name="companyId">companyId</param>
        /// <param name="numberOfNotes">numberOfNotes</param>
        /// <param name="enterString">enterString</param>
        /// <returns>a string with all Notes separeted with  the enterString</returns>
        public string GetAllProjectNotes(int projectId, int companyId, int numberOfNotes, string enterString)
        {
            string note = "";

            foreach (ProjectTDS.LFS_PROJECT_NOTERow row in (ProjectTDS.LFS_PROJECT_NOTEDataTable)Table)
            {
                if ((row.ProjectID == projectId) && (row.COMPANY_ID == companyId) && (!row.Deleted))
                {
                    // ... Get user name
                    LoginGateway loginGateway = new LoginGateway();
                    loginGateway.LoadAllByLoginId(row.LoginID, companyId);
                    string user = loginGateway.GetLastName(row.LoginID, companyId) + " " + loginGateway.GetFirstName(row.LoginID, companyId);

                    // ... Form the note string
                    string rowNote = ""; if (!row.IsNoteNull()) rowNote = row.Note; else rowNote = "( None )";
                    note = note + row.DateTime + " (" + user.Trim() + ")";
                    note = note + ", Subject: " + row.Subject + enterString;
                    note = note + "note: " + rowNote;

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

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

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

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

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

示例11: UpdateForReport

 // ////////////////////////////////////////////////////////////////////////
 // PUBLIC METHODS
 //
 /// <summary>
 /// UpdateForReport
 /// </summary>
 /// <param name="projectId">projectId</param>
 /// <param name="companyId">companyId</param>        
 public void UpdateForReport(int projectId, int companyId)
 {
     // For LFS_PROJECT_NOTE
     // ... for Writer Name
     foreach (ProjectSynopsisReportTDS.LFS_PROJECT_NOTERow row in this.Table.Rows)
     {
         if (row.ProjectID == projectId)
         {
             LoginGateway loginGateway = new LoginGateway();
             loginGateway.LoadAllByLoginId(Convert.ToInt32(row.LoginID), companyId);
             try
             {
                 row.WrittenBy = loginGateway.GetLastName(Convert.ToInt32(row.LoginID), companyId) + " " + loginGateway.GetFirstName(Convert.ToInt32(row.LoginID), companyId);
             }
             catch
             {
                 row.WrittenBy = "";
             }
         }
     }
 }
开发者ID:NosDeployer,项目名称:TestBranching,代码行数:29,代码来源:ProjectSynopsisNote.cs

示例12: UpdateForProcess

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

            foreach (RehabAssessmentTDS.CommentDetailsRow row in (RehabAssessmentTDS.CommentDetailsDataTable)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,代码来源:RehabAssessmentCommentDetails.cs

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

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

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


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