本文整理汇总了C#中BusinessObjects.MasterDataBLL.IsPaymentTermNameNull方法的典型用法代码示例。如果您正苦于以下问题:C# MasterDataBLL.IsPaymentTermNameNull方法的具体用法?C# MasterDataBLL.IsPaymentTermNameNull怎么用?C# MasterDataBLL.IsPaymentTermNameNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BusinessObjects.MasterDataBLL
的用法示例。
在下文中一共展示了MasterDataBLL.IsPaymentTermNameNull方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
//.........这里部分代码省略.........
if (Request["ParentFormID"] != null) {
this.ViewState["ParentFormID"] = Request["ParentFormID"];
} else {
this.Session["ErrorInfor"] = "未找到申请单,请联系管理员";
Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
}
if (Request["PeriodPurchaseID"] != null) {
DateTime Period = new MasterDataBLL().GetPeriodPurchaseById(int.Parse(Request["PeriodPurchaseID"].ToString())).PeriodPurchase;
this.ViewState["Period"] = Period.ToShortDateString();
} else {
this.Session["ErrorInfor"] = "没有费用期间,请联系管理员";
Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
}
if (Request["VendorID"] != null) {
this.ViewState["VendorID"] = Request["VendorID"];
} else {
this.Session["ErrorInfor"] = "未找到Vendor,请联系管理员";
Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
}
if (Request["ItemCategoryID"] != null) {
this.ViewState["ItemCategoryID"] = Request["ItemCategoryID"];
} else {
this.Session["ErrorInfor"] = "未找到Item Category,请联系管理员";
Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
}
if (Request["PurchaseBudgetTypeID"] != null) {
this.ViewState["PurchaseBudgetTypeID"] = Request["PurchaseBudgetTypeID"];
} else {
this.Session["ErrorInfor"] = "未找到预算类型,请联系管理员";
Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
}
if (Request["CurrencyID"] != null) {
this.ViewState["CurrencyID"] = Request["CurrencyID"];
} else {
this.Session["ErrorInfor"] = "未找到币种,请联系管理员";
Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
}
this.PeriodCtl.Text = DateTime.Parse(this.ViewState["Period"].ToString()).ToString("yyyy-MM");
MasterData.VendorRow vendor = new MasterDataBLL().GetVendorByID(int.Parse(this.ViewState["VendorID"].ToString()));
MasterData.PaymentTermRow paymentTerm = new MasterDataBLL().GetPaymentTermById(vendor.PaymentTermID)[0];
if (paymentTerm != null && !paymentTerm.IsPaymentTermNameNull()) {
this.PaymentTermCtl.Text = paymentTerm.PaymentTermName;
}
}
MasterData.VendorRow vendor1 = new VendorTableAdapter().GetDataByID(int.Parse(this.ViewState["VendorID"].ToString()))[0];
this.VendorCodeCtl.Text = vendor1.VendorCode;
this.VendorNameCtl.Text = vendor1.VendorName;
this.VendorAddressCtl.Text = vendor1.VendorAddress;
this.ItemCategoryCtl.Text = new ItemCategoryTableAdapter().GetDataByID(int.Parse(this.ViewState["ItemCategoryID"].ToString()))[0].ItemCategoryName;
this.CurrencyCtl.Text = new CurrencyTableAdapter().GetDataByID(int.Parse(this.ViewState["CurrencyID"].ToString()))[0].CurrencyShortName;
this.PurchaseBudgetTypeCtl.Text = new PurchaseBudgetTypeTableAdapter().GetDataByID(int.Parse(this.ViewState["PurchaseBudgetTypeID"].ToString()))[0].PurchaseBudgetTypeName;
this.ViewState["ExchangeRate"] = new MasterDataBLL().GetExchangeRateByPeriod(int.Parse(ViewState["CurrencyID"].ToString()), DateTime.Parse(ViewState["Period"].ToString()));
if (decimal.Parse(this.ViewState["ExchangeRate"].ToString()) == 0) {
this.Session["ErrorInfor"] = "未找到汇率,请联系管理员";
Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
}
this.ExchangeRateCtl.Text = this.ViewState["ExchangeRate"].ToString();
//判断费用期间是否正确
MasterDataBLL bll = new MasterDataBLL();
if (!new MasterDataBLL().IsValidPeriodPurchase(DateTime.Parse(this.ViewState["Period"].ToString()))) {
this.SubmitBtn.Visible = false;
PageUtility.ShowModelDlg(this, "不允许申请本月项目,请删除草稿并联系财务部!");
return;
}
//申请单编号和申请单金额
PurchaseDS.FormRow applyFormRow = this.FormPurchaseBLL.GetFormByID(int.Parse(this.ViewState["ParentFormID"].ToString()))[0];
this.ApplyFormNoCtl.Text = applyFormRow.FormNo;
this.ViewState["ParentFormNo"] = applyFormRow.FormNo;
string url = string.Empty;
switch (applyFormRow.PageType) {
case (int)SystemEnums.PageType.ActivityApply:
url = "/FormSale/ActivityApproval.aspx?ShowDialog=1&ObjectId=" + applyFormRow.FormID;
this.ViewState["POType"] = SystemEnums.POType.Sale;
this.ViewState["ApplyAmountRMB"] = new FormSaleBLL().GetFormSaleApplyByID(applyFormRow.FormID)[0].AmountRMB;
break;
case (int)SystemEnums.PageType.NoActivityApply:
url = "/FormSale/NoActivityApproval.aspx?ShowDialog=1&ObjectId=" + applyFormRow.FormID;
this.ViewState["POType"] = SystemEnums.POType.Sale;
this.ViewState["ApplyAmountRMB"] = new FormSaleBLL().GetFormSaleApplyByID(applyFormRow.FormID)[0].AmountRMB;
break;
case (int)SystemEnums.PageType.FormMarketingApply:
url = "/FormMarketing/MarketingApproval.aspx?ShowDialog=1&ObjectId=" + applyFormRow.FormID;
this.ViewState["POType"] = SystemEnums.POType.Marketing;
this.ViewState["ApplyAmountRMB"] = new FormMarketingBLL().GetFormMarketingApplyByID(applyFormRow.FormID)[0].AmountRMB;
break;
case (int)SystemEnums.PageType.RDApply:
url = "/FormRD/RDApproval.aspx?ShowDialog=1&ObjectId=" + applyFormRow.FormID;
this.ViewState["POType"] = SystemEnums.POType.RD;
this.ViewState["ApplyAmountRMB"] = new FormRDBLL().GetFormRDApplyByID(applyFormRow.FormID)[0].AmountRMB;
break;
}
this.ApplyFormNoCtl.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + url + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')";
this.ApplyAmountCtl.Text = this.ViewState["ApplyAmountRMB"].ToString();
}
}