本文整理汇总了C#中LiquiForce.LFSLive.DA.Projects.Projects.ProjectGateway.GetStartDate方法的典型用法代码示例。如果您正苦于以下问题:C# ProjectGateway.GetStartDate方法的具体用法?C# ProjectGateway.GetStartDate怎么用?C# ProjectGateway.GetStartDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LiquiForce.LFSLive.DA.Projects.Projects.ProjectGateway
的用法示例。
在下文中一共展示了ProjectGateway.GetStartDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InsertProject
private void InsertProject(int projectId)
{
// ... Data for current project
ProjectGateway projectGateway = new ProjectGateway(projectTDS);
projectGateway.LoadByProjectId(projectId);
// ... Definition of general variables
Int64 countryId = projectGateway.GetCountryID(projectId);
int officeId = projectGateway.GetOfficeID(projectId);
Int64? provinceId = projectGateway.GetProvinceID(projectId);
Int64? cityId = projectGateway.GetCityID(projectId);
Int64? countyId = projectGateway.GetCountyID(projectId);
int? projectLeadId = null; if (projectGateway.GetProjectLeadID(projectId).HasValue) projectLeadId = (int)projectGateway.GetProjectLeadID(projectId);
int salesmanId = projectGateway.GetSalesmanID(projectId);
bool deleted = false;
int? clientPrimaryContactID = null; if (projectGateway.GetClientPrimaryContactID(projectId).HasValue) clientPrimaryContactID = (int)projectGateway.GetClientPrimaryContactID(projectId);
int? clientSecondaryContactID = null; if (projectGateway.GetClientSecondaryContactID(projectId).HasValue) clientSecondaryContactID = (int)projectGateway.GetClientSecondaryContactID(projectId);
int? OriginalProjectID = projectId;
int? projectNumberCopy = null; if (projectGateway.GetLastProjectNumberCopy(projectId).HasValue) projectNumberCopy = (int)projectGateway.GetLastProjectNumberCopy(projectId) + 1; else projectNumberCopy = 1;
string projectNumber = projectGateway.GetProjectNumber(projectId) + "-" + projectNumberCopy.ToString();
string projectType = "Proposal";
string projectState = projectGateway.GetProjectState(projectId);
string name = projectGateway.GetName(projectId);
string description = projectGateway.GetDescription(projectId);
DateTime? proposalDate = null; if (projectGateway.GetProposalDate(projectId).HasValue) proposalDate = projectGateway.GetProposalDate(projectId);
DateTime? startDate = null; if (projectGateway.GetStartDate(projectId).HasValue) startDate = projectGateway.GetStartDate(projectId);
DateTime? endDate = null; if (projectGateway.GetEndDate(projectId).HasValue) endDate = projectGateway.GetEndDate(projectId);
int clientId = projectGateway.GetClientID(projectId);
string clientProjectNumber = projectGateway.GetClientProjectNumber(projectId);
int? libraryCategoriesId = null; if (projectGateway.GetLibraryCategoriesId(projectId).HasValue) libraryCategoriesId = (int)projectGateway.GetLibraryCategoriesId(projectId);
bool fairWageApplies = projectGateway.GetFairWageApplies(projectId);
// ... Insert Project
Project project = new Project(projectTDS);
project.Insert(countryId, officeId, projectLeadId, salesmanId, projectNumber, projectType, projectState, name, description, proposalDate, startDate, endDate, clientId, clientPrimaryContactID, clientSecondaryContactID, clientProjectNumber, deleted, OriginalProjectID, projectNumberCopy, libraryCategoriesId, provinceId, cityId, Int32.Parse(hdfCompanyId.Value.Trim()), countyId, fairWageApplies);
// ... Insert History
ProjectHistory projectHistory = new ProjectHistory(projectTDS);
projectHistory.Insert(0, 1, projectState, DateTime.Now, Convert.ToInt32(Session["loginID"]), Int32.Parse(hdfCompanyId.Value.Trim()));
}
示例2: UpdateState
//.........这里部分代码省略.........
projectState = "Waiting";
break;
case "project_activate":
projectState = "Active";
break;
case "project_inactivate":
projectState = "Inactive";
break;
case "project_complete":
projectState = "Complete";
break;
case "project_cancel":
projectState = "Canceled";
break;
case "project_unpromote_to_ballpark":
projectState = "Active";
projectType = "Ballpark";
break;
case "project_unpromote_to_proposal":
projectState = "Awarded";
projectType = "Proposal";
break;
case "project_tagAsInternal":
projectState = "Active";
projectType = "Internal";
break;
//Internal Project
case "internalProject_activate":
projectState = "Active";
break;
case "internalProject_complete":
projectState = "Complete";
break;
case "internalProject_cancel":
projectState = "Canceled";
break;
case "internalProject_promote_to_proposal":
projectState = "Awarded";
projectType = "Proposal";
break;
case "internalProject_promote_to_project":
projectState = "Active";
projectType = "Project";
break;
//Ballpark
case "ballparkProject_activate":
projectState = "Active";
break;
case "ballparkProject_cancel":
projectState = "Canceled";
break;
case "ballparkProject_promote_to_proposal":
projectState = "Bidding";
projectType = "Proposal";
break;
case "ballparkProject_promote_to_project":
projectState = "Active";
projectType = "Project";
break;
}
string name = projectGateway.GetName(projectId);
string description = projectGateway.GetDescription(projectId);
DateTime? proposalDate = projectGateway.GetProposalDate(projectId);
DateTime? startDate = projectGateway.GetStartDate(projectId);
DateTime? endDate = projectGateway.GetEndDate(projectId);
int clientId = projectGateway.GetClientID(projectId);
string clientProjectNumber = projectGateway.GetClientProjectNumber(projectId);
int? clientPrimaryContactId = projectGateway.GetClientPrimaryContactID(projectId);
int? clientSecondaryContactId = projectGateway.GetClientSecondaryContactID(projectId);
bool deleted = projectGateway.GetDeleted(projectId);
int? libraryCategoriesId = projectGateway.GetLibraryCategoriesId(projectId);
bool fairWageApplies = projectGateway.GetFairWageApplies(projectId);
// Update project
Project project = new Project(projectTDS);
string projectNumber = project.UpdateProjectNumber(projectId, salesmanId);
project.Update(projectId, countryId, officeId, projectLeadId, salesmanId, projectNumber, projectType, projectState, name, description, proposalDate, startDate, endDate, clientId, clientProjectNumber, clientPrimaryContactId, clientSecondaryContactId, deleted, libraryCategoriesId, provinceId, cityId, Int32.Parse(hdfCompanyId.Value.Trim()), countyId, fairWageApplies);
//Insert in history
ProjectHistory projectHistory = new ProjectHistory(projectTDS);
int newRefId = projectHistory.GetNewRefId();
projectHistory.Insert(projectId, newRefId, projectState, DateTime.Now, Convert.ToInt32(Session["loginID"]), Int32.Parse(hdfCompanyId.Value.Trim()));
}