本文整理汇总了C#中BusinessObjects.MasterDataBLL.GetMarketingProjectById方法的典型用法代码示例。如果您正苦于以下问题:C# MasterDataBLL.GetMarketingProjectById方法的具体用法?C# MasterDataBLL.GetMarketingProjectById怎么用?C# MasterDataBLL.GetMarketingProjectById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BusinessObjects.MasterDataBLL
的用法示例。
在下文中一共展示了MasterDataBLL.GetMarketingProjectById方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
if (!this.IsPostBack) {
String title = this.GetLocalResourceObject("titleLabel.Text").ToString();
PageUtility.SetContentTitle(this.Page, title);
// 用户信息,职位信息
AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"];
AuthorizationDS.PositionRow rowUserPosition = (AuthorizationDS.PositionRow)Session["Position"];
this.ViewState["StuffUserID"] = stuffUser.StuffUserId;
this.ViewState["PositionID"] = rowUserPosition.PositionId;
this.StuffNameCtl.Text = CommonUtility.GetStaffFullName(stuffUser);
this.PositionNameCtl.Text = rowUserPosition.PositionName;
this.DepartmentNameCtl.Text = new OUTreeBLL().GetOrganizationUnitById(rowUserPosition.OrganizationUnitId).OrganizationUnitName;
this.ViewState["DepartmentID"] = rowUserPosition.OrganizationUnitId;
this.StuffNoCtl.Text = stuffUser.IsStuffNoNull() ? "" : stuffUser.StuffNo;
this.AttendDateCtl.Text = stuffUser.AttendDate.ToShortDateString();
if (this.Request["RejectObjectID"] != null) {
this.ViewState["RejectedObjectID"] = int.Parse(this.Request["RejectObjectID"].ToString());
}
VATTypeDDL.DataBind();
PaymentTypeDDL.DataBind();
PaymentTypeDDL_SelectedIndexChanged(null, null);
InvoiceStatusDDL.DataBind();
//如果是草稿进行赋值
int formApplyID;
if (Request["ObjectId"] != null) {
this.ViewState["ObjectId"] = int.Parse(Request["ObjectId"]);
FormDS.FormMarketingPaymentRow rowFormPayment = this.FormMarketingBLL.GetFormMarketingPaymentByID(int.Parse(this.ViewState["ObjectId"].ToString()));
formApplyID = rowFormPayment.FormMarketingApplyID;
this.ViewState["FormMarketingApplyID"] = formApplyID;
if (this.Request["RejectObjectID"] == null) {
this.DeleteBtn.Visible = true;
} else {
this.DeleteBtn.Visible = false;
}
//赋值备注等
this.PaymentTypeDDL.SelectedValue = rowFormPayment.PaymentTypeID.ToString();
PaymentTypeDDL_SelectedIndexChanged(null, null);
this.InvoiceStatusDDL.SelectedValue = rowFormPayment.InvoiceStatusID.ToString();
if (!rowFormPayment.IsVATTypeIDNull()) {
VATTypeDDL.SelectedValue = rowFormPayment.VATTypeID.ToString();
}
if (!rowFormPayment.IsPaymentFileNameNull()) {
this.UCFliePayment.AttachmentFileName = rowFormPayment.PaymentFileName;
}
if (!rowFormPayment.IsPaymentRealFileNameNull()) {
this.UCFliePayment.RealAttachmentFileName = rowFormPayment.PaymentRealFileName;
}
if (!rowFormPayment.IsRemarkNull()) {
this.RemarkCtl.Text = rowFormPayment.Remark;
}
new FormMarketingPaymentDetailTableAdapter().FillCurrentData(this.InnerDS.FormMarketingPaymentDetail, rowFormPayment.FormMarketingPaymentID, rowFormPayment.FormMarketingApplyID);
new FormInvoiceTableAdapter().FillByFormID(this.InnerDS.FormInvoice, rowFormPayment.FormMarketingPaymentID);
} else {
formApplyID = int.Parse(Request["FormMarketingApplyID"]);
this.ViewState["FormMarketingApplyID"] = formApplyID;
new FormMarketingPaymentDetailTableAdapter().FillByMarketingApplyID(this.InnerDS.FormMarketingPaymentDetail, formApplyID);
}
MasterDataBLL mdBLL = new MasterDataBLL();
this.FormNoCtl.Text = this.FormMarketingBLL.GetFormByID(formApplyID)[0].FormNo;
FormDS.FormMarketingApplyRow rowFormApply = this.FormMarketingBLL.GetFormMarketingApplyByID(formApplyID)[0];
this.PeriodCtl.Text = rowFormApply.FPeriod.ToString("yyyy-MM");
this.CustomerChannelCtl.Text = new CustomerChannelTableAdapter().GetDataByID(rowFormApply.CustomerChannelID)[0].CustomerChannelName;
this.BrandCtl.Text = new BrandTableAdapter().GetDataByID(rowFormApply.BrandID)[0].BrandName;
this.CurrencyCtl.Text = new CurrencyTableAdapter().GetDataByID(rowFormApply.CurrencyID)[0].CurrencyShortName;
this.ExchangeRateCtl.Text = rowFormApply.ExchangeRate.ToString();
this.ExpenseCategoryCtl.Text = mdBLL.GetExpenseCategoryById(rowFormApply.ExpenseCategoryID).ExpenseCategoryName;
this.ProjectNameCtl.Text = mdBLL.GetMarketingProjectById(rowFormApply.MarketingProjectID).MarketingProjectName;
this.ProjectDescCtl.Text = rowFormApply.IsProjectDescNull() ? "" : rowFormApply.ProjectDesc;
if (!rowFormApply.IsApplyFileNameNull())
this.UCFileApply.AttachmentFileName = rowFormApply.ApplyFileName;
if (!rowFormApply.IsApplyRealFileNameNull())
this.UCFileApply.RealAttachmentFileName = rowFormApply.ApplyRealFileName;
if (!rowFormApply.IsActivityBeginDateNull()) {
this.ActivityBeginCtl.Text = rowFormApply.ActivityBeginDate.ToString("yyyy-MM-dd");
}
if (!rowFormApply.IsActivityEndDateNull()) {
this.ActivityEndCtl.Text = rowFormApply.ActivityEndDate.ToString("yyyy-MM-dd");
}
this.ViewState["CostCenterID"] = this.FormMarketingBLL.GetFormByID(int.Parse(this.ViewState["FormMarketingApplyID"].ToString()))[0].CostCenterID;
this.CostCenterCtl.Text = CommonUtility.GetMAACostCenterFullName(int.Parse(this.ViewState["CostCenterID"].ToString()));
}
}