• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# RAF.LoginGateway类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Generate

        private void Generate()
        {
            mReport1 master = (mReport1)this.Master;
            int companyId = Convert.ToInt32(Session["companyID"]);
            string type = Request.QueryString["type"].ToString();
            int costingSheetId = 0;
            int projectId = 0;

            ProjectCostingSheetInformationBasicInformation projectCostingSheetInformationBasicInformation = new ProjectCostingSheetInformationBasicInformation();

            if (ddlCostingSheets.SelectedValue != "-1")
            {
                // Get Data
                costingSheetId = Convert.ToInt32(ddlCostingSheets.SelectedValue);
                projectCostingSheetInformationBasicInformation.LoadByCostingSheetIdForPreviewReport(costingSheetId, companyId);
                ProjectCostingSheetInformationBasicInformationGateway projectCostingSheetInformationBasicInformationGateway = new ProjectCostingSheetInformationBasicInformationGateway(projectCostingSheetInformationBasicInformation.Data);
                projectId = projectCostingSheetInformationBasicInformationGateway.GetProjectID(costingSheetId);

                // ... set properties to master page
                master.Data = projectCostingSheetInformationBasicInformation.Data;
                master.Table = projectCostingSheetInformationBasicInformation.TableName;
                master.Report = new ProjectCostingSheetsPreview();

                // Get report
                if (projectCostingSheetInformationBasicInformation.Table.Rows.Count > 0)
                {
                    ProjectGateway projectGateway = new ProjectGateway();
                    projectGateway.LoadByProjectId(projectId);
                    int clientId = projectGateway.GetClientID(projectId);

                    CompaniesGateway companiesGateway = new CompaniesGateway();
                    companiesGateway.LoadByCompaniesId(clientId, companyId);
                    master.SetParameter("Client", companiesGateway.GetName(clientId));

                    string name = projectGateway.GetName(projectId);
                    master.SetParameter("Project", name);

                    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());

                    master.SetParameter("CostingSheet", projectCostingSheetInformationBasicInformationGateway.GetName(costingSheetId));

                    if (type == "resume")
                    {
                        ((Section)master.Report.ReportDefinition.Sections["detailsLabourHours"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["detailsLabourHours2"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["detailsUnits"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["detailsUnits2"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["detailsMaterials"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["detailsMaterials2"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["detailsOtherCosts"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["detailsOtherCosts2"]).SectionFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["detailsSubcontractors"]).SectionFormat.EnableSuppress = true;
                        //((Section)master.Report.ReportDefinition.Sections["detailsSubcontractors2"]).SectionFormat.EnableSuppress = true;
                    }
                    else
                    {
                        ((Section)master.Report.ReportDefinition.Sections["detailsLabourHours"]).SectionFormat.EnableSuppress = false;
                        ((Section)master.Report.ReportDefinition.Sections["detailsLabourHours2"]).SectionFormat.EnableSuppress = false;
                        ((Section)master.Report.ReportDefinition.Sections["detailsUnits"]).SectionFormat.EnableSuppress = false;
                        ((Section)master.Report.ReportDefinition.Sections["detailsUnits2"]).SectionFormat.EnableSuppress = false;
                        ((Section)master.Report.ReportDefinition.Sections["detailsMaterials"]).SectionFormat.EnableSuppress = false;
                        ((Section)master.Report.ReportDefinition.Sections["detailsMaterials2"]).SectionFormat.EnableSuppress = false;
                        ((Section)master.Report.ReportDefinition.Sections["detailsOtherCosts"]).SectionFormat.EnableSuppress = false;
                        ((Section)master.Report.ReportDefinition.Sections["detailsOtherCosts2"]).SectionFormat.EnableSuppress = false;
                        ((Section)master.Report.ReportDefinition.Sections["detailsSubcontractors"]).SectionFormat.EnableSuppress = false;
                        //((Section)master.Report.ReportDefinition.Sections["detailsSubcontractors2"]).SectionFormat.EnableSuppress = false;
                    }

                    if (projectGateway.GetCountryID(projectId) == 1)//Canada
                    {
                        // General
                        ((Section)master.Report.ReportDefinition.Sections["GroupHeaderSection1"]).ReportObjects["Text32"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["GroupHeaderSection1"]).ReportObjects["Text34"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["GroupHeaderSection1"]).ReportObjects["Text36"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["GroupHeaderSection1"]).ReportObjects["Text38"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["GroupHeaderSection1"]).ReportObjects["Text2"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["GroupHeaderSection1"]).ReportObjects["headerTotalSubcontractorsUsd"].ObjectFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["Section3"]).ReportObjects["TotalLabourHoursUsd1"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["Section3"]).ReportObjects["TotalUnitsUsd1"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["Section3"]).ReportObjects["TotalMaterialsUsd1"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["Section3"]).ReportObjects["TotalOtherCostsUsd1"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["Section3"]).ReportObjects["GrandTotalUsd1"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["Section3"]).ReportObjects["TotalSubcontractorsUsd1"].ObjectFormat.EnableSuppress = true;

                        ((Section)master.Report.ReportDefinition.Sections["GroupFooterSection1"]).ReportObjects["Text5"].ObjectFormat.EnableSuppress = true;
                        ((Section)master.Report.ReportDefinition.Sections["GroupFooterSection1"]).ReportObjects["GrandTotalUsd2"].ObjectFormat.EnableSuppress = true;

                        // Labour Hours
                        ReportDocument rpLabourHoursDetails = master.Report.OpenSubreport("LabourHoursDetails");
                        ReportDocument rpLabourHoursResume = master.Report.O 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LitJson.FsmContext类代码示例发布时间:2022-05-26
下一篇:
C# Projects.ProjectGateway类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap