本文整理汇总了C#中BusinessObjects.MasterDataBLL类的典型用法代码示例。如果您正苦于以下问题:C# MasterDataBLL类的具体用法?C# MasterDataBLL怎么用?C# MasterDataBLL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MasterDataBLL类属于BusinessObjects命名空间,在下文中一共展示了MasterDataBLL类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: gvPersonalReimburseDetails_RowDataBound
protected void gvPersonalReimburseDetails_RowDataBound(object sender, GridViewRowEventArgs e)
{
// 对数据列进行赋值
if (e.Row.RowType == DataControlRowType.DataRow) {
if ((e.Row.RowState & DataControlRowState.Edit) != DataControlRowState.Edit) {
DataRowView drvDetail = (DataRowView)e.Row.DataItem;
FormDS.FormPersonalReimburseDetailRow row = (FormDS.FormPersonalReimburseDetailRow)drvDetail.Row;
TotalRMBFee = decimal.Round((TotalRMBFee + row.RMB), 2);
TotalFee = decimal.Round((TotalFee + row.ApplyAmount), 2);
//超费用标准
Label lblRMB = (Label)e.Row.FindControl("lblRMB");
decimal limit = new MasterDataBLL().GetLimitForOverStandard(0, int.Parse(ViewState["StaffLevelID"].ToString()), row.ManageExpenseItemID, row.RMB);
if (limit != 0) {
lblRMB.Attributes.Add("title", PageUtility.TransferLanguage(this.Page, "超过费用标准 ¥" + limit, "Over Cost Standard ¥" + limit));
lblRMB.ForeColor = System.Drawing.Color.Red;
}
}
}
if (e.Row.RowType == DataControlRowType.Footer) {
Label lblTotal = (Label)e.Row.FindControl("lblTotal");
lblTotal.Text = TotalFee.ToString("N");
Label lblTotalRMB = (Label)e.Row.FindControl("lblTotalRMB");
lblTotalRMB.Text = TotalRMBFee.ToString("N");
}
}
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:25,代码来源:FormPersonalReimburseApproval.aspx.cs
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
try {
//��ȡURL���ݲ���
string strMode = this.Request.QueryString["mode"] == null ? "" : this.Request.QueryString["mode"].ToString();
string strID = this.Request.QueryString["id"] == null ? "" : this.Request.QueryString["id"].ToString();
//���ÿؼ�״̬
setControlStatus(strMode);
// ��ȡҳ��������Ϣ
if (!strMode.Equals("") && !strMode.Equals("add") && !strID.Equals("")) {
MasterDataBLL bll = new MasterDataBLL();
ERS.BulletinDataTable dt = bll.GetBulletinById(Convert.ToInt32(strID));
if (dt != null && dt.Count > 0) {
ERS.BulletinRow dr = dt[0];
txtTitle.Text = dr.BulletinTitle.ToString();
lblCreator.Text = dr.Creator.ToString();
lblCreateTime.Text = dr.CreateTime.ToString();
txtContent.Text = dr.BulletinContent.ToString();
}
}
} catch (Exception ex) {
PageUtility.DealWithException(this, ex);
}
}
开发者ID:hijoy,项目名称:VSL_ERS,代码行数:27,代码来源:BulletinDetail.aspx.cs
示例3: InitCustomerTimesLimit
//��ѯ�����������ô���
public void InitCustomerTimesLimit()
{
ExpenseItemRemainTimes = new Dictionary<int, object[]>();
int CustomerID = int.Parse(this.ViewState["CustomerID"].ToString());
int SubCategoryID = int.Parse(this.ViewState["ExpenseSubCategoryID"].ToString());
DateTime Period = DateTime.Parse(this.ViewState["EndPeriod"].ToString());
ERS.ExpenseItemDataTable ExpenseTable = new MasterDataBLL().GetExpenseItemBySubCateId(SubCategoryID);
object[] tempArray;
object[] tempArray1 = new object[2];
foreach (ERS.ExpenseItemRow item in ExpenseTable.Rows) {
if (item.IsInContract) {
tempArray = this.SalesApplyBLL.GetCustomerTimesLimitByParameter(CustomerID, item.ExpenseItemID, Period.Year);
if ((bool)tempArray[0]) {
tempArray1[0] = (bool)tempArray[0];
tempArray1[1] = int.Parse(tempArray[2].ToString());
ExpenseItemRemainTimes.Add(item.ExpenseItemID, tempArray1);
} else {
tempArray1[0] = false;
tempArray1[1] = int.Parse(tempArray[2].ToString());
ExpenseItemRemainTimes.Add(item.ExpenseItemID, tempArray1);
}
}
}
this.ViewState["ExpenseItemRemainTimes"] = ExpenseItemRemainTimes;
}
开发者ID:hijoy,项目名称:VSL_ERS,代码行数:26,代码来源:SalesGeneralApply.aspx.cs
示例4: GetCompanyCode
public string GetCompanyCode(object ID)
{
MasterDataBLL msdBLL = new MasterDataBLL();
MasterData.VendorTypeRow vType = msdBLL.GetVendorTypeById((int)ID);
MasterData.CompanyRow company = msdBLL.GetCompanyById(vType.CompanyID);
return company.CompanyCode;
}
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:7,代码来源:VendorSearch.aspx.cs
示例5: GetCompanyID
public string GetCompanyID()
{
MasterDataBLL mdBLL = new MasterDataBLL();
OUTreeBLL otBLL = new OUTreeBLL();
AuthorizationDS.PositionRow rowPosition = (AuthorizationDS.PositionRow)Session["Position"];
AuthorizationDS.OrganizationUnitRow rowOU = GetNearestCostCenter(rowPosition.OrganizationUnitId);
MasterData.CostCenterRow rowCostCenter = mdBLL.GetCostCenterById(rowOU.CostCenterID);
return rowCostCenter.CompanyID.ToString();
}
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:9,代码来源:VendorSearch.aspx.cs
示例6: IsBusinessProxy
protected bool IsBusinessProxy(int ProxyUserID, DateTime SubmitDate)
{
AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"];
ERS.ProxyReimburseDataTable tbProxy = new MasterDataBLL().GetProxyReimburseByParameter(ProxyUserID,stuffUser.StuffUserId , SubmitDate);
if (tbProxy != null && tbProxy.Count > 0) {
return true;
}
return false;
}
开发者ID:hijoy,项目名称:VSL_ERS,代码行数:9,代码来源:BasePage.cs
示例7: GetExpenseItemNameByID
public string GetExpenseItemNameByID(object expenseItemID)
{
if (expenseItemID.ToString() != string.Empty) {
int id = Convert.ToInt32(expenseItemID);
ERS.ExpenseItemRow row = new MasterDataBLL().GetExpenseItemByID(id);
return row.AccountingCode + "--" + row.ExpenseItemName;
} else {
return null;
}
}
开发者ID:hijoy,项目名称:VSL_ERS,代码行数:10,代码来源:ReimburseGoodsApply.aspx.cs
示例8: GetProductNameByID
public string GetProductNameByID(object skuID)
{
if (skuID.ToString() != string.Empty) {
int id = Convert.ToInt32(skuID);
ERS.SKURow sku = new MasterDataBLL().GetSKUById(id);
return sku.SKUNo + '-' + sku.SKUName + "-" + sku.Spec;
} else {
return null;
}
}
开发者ID:hijoy,项目名称:VSL_ERS,代码行数:10,代码来源:SalesGeneralApproval.aspx.cs
示例9: ImporterData
private void ImporterData(object source, System.Timers.ElapsedEventArgs e)
{
String FilePath = ConfigurationManager.AppSettings["ImporterService.FilePath"];
String BakPath = ConfigurationManager.AppSettings["ImporterService.BakPath"];
int hour = int.Parse(ConfigurationManager.AppSettings["ImporterService.hour"]);
if (hour == DateTime.Now.Hour) {
MasterDataBLL masterdatabll = new MasterDataBLL();
LogBLL logbll = new LogBLL();
DirectoryInfo mydir = new DirectoryInfo(FilePath);
//0 SKU 1 Item 2 Customer
FileSystemInfo[] SKUfile = mydir.GetFileSystemInfos("IIM*");
if (SKUfile.Length > 0) {
ImportTxtData(0, SKUfile);
} else {
int logId = logbll.InsertImportLog(0, "未找到文件", 1, 0, 0, 1);
logbll.InsertImportLogDetail(logId, 0, "未找到SKU文件!");
}
FileSystemInfo[] Itemfile = mydir.GetFileSystemInfos("HPC*");
if (Itemfile.Length > 0) {
ImportTxtData(1, Itemfile);
} else {
int logId = logbll.InsertImportLog(1, "未找到文件", 1, 0, 0, 1);
logbll.InsertImportLogDetail(logId, 0, "未找到Item文件!");
}
FileSystemInfo[] Customerfile = mydir.GetFileSystemInfos("RCM*");
if (Customerfile.Length > 0) {
ImportTxtData(2, Customerfile);
} else {
int logId = logbll.InsertImportLog(2, "未找到文件", 1, 0, 0, 1);
logbll.InsertImportLogDetail(logId, 0, "未找到Customer文件!");
}
//FileSystemInfo[] DeliveryGoods = mydir.GetFileSystemInfos("DeliveryGoods*");
//if (DeliveryGoods.Length > 0) {
// ImportTxtData(3, Customerfile);
//} else {
// int logId = logbll.InsertImportLog(3, "未找到文件", 1, 0, 0, 1);
// logbll.InsertImportLogDetail(logId, 0, "未找到Delivery Goods文件!");
//}
FileSystemInfo[] APHPayment = mydir.GetFileSystemInfos("APHPAY*");
if (APHPayment.Length > 0) {
ImportTxtData(4, APHPayment);
} else {
int logId = logbll.InsertImportLog(4, "未找到文件", 1, 0, 0, 1);
logbll.InsertImportLogDetail(logId, 0, "未找到APHPAY文件!");
}
foreach (FileSystemInfo file in mydir.GetFileSystemInfos()) {
File.Move(file.FullName, BakPath + file.Name);
}
}
}
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:53,代码来源:ImporterService.cs
示例10: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
this.Page.Title = "ϵͳ����";
MasterDataBLL bll = new MasterDataBLL();
ERS.BulletinRow bulletin = bll.GetBulletinById(int.Parse(Request["ObjectId"]))[0];
this.BulletinTitleLabel.Text = bulletin.BulletinTitle;
this.BulletinContentCtl.Text = bulletin.BulletinContent;
this.CreateTimeLabel.Text = bulletin.CreateTime.ToString("yyyy-MM-dd");
if (!bulletin.IsAttachFileNameNull())
this.ViewUCFileUpload.AttachmentFileName = bulletin.AttachFileName;
if (!bulletin.IsRealAttachFileNameNull())
this.ViewUCFileUpload.RealAttachmentFileName = bulletin.RealAttachFileName;
}
开发者ID:hijoy,项目名称:VSL_ERS,代码行数:13,代码来源:BulletinDetail.aspx.cs
示例11: IsSubmitValid
public bool IsSubmitValid()
{
if (this.VATRateDDL.SelectedValue != "0") {
MasterData.VatTypeRow VATRate = new MasterDataBLL().GetVatTypeById(int.Parse(this.VATRateDDL.SelectedValue))[0];
if (VATRate.HasTax && (this.AMTTaxCtl.Text == string.Empty || this.AMTTaxCtl.Text == "0")) {
PageUtility.ShowModelDlg(this.Page, "请录入税金!", "please key in tax amount");
return false;
}
if (!VATRate.HasTax && this.AMTTaxCtl.Text != string.Empty && this.AMTTaxCtl.Text != "0") {
PageUtility.ShowModelDlg(this.Page, "您选择的税率类型没有税金!", "there is no tax regarding the VAT rate you selected");
return false;
}
} else {
PageUtility.ShowModelDlg(this.Page, "请选择税率类型!", "please select VAT Rate");
return false;
}
if (this.UCExpectPaymentDateCtl.SelectedDate == "") {
PageUtility.ShowModelDlg(this.Page, "请录入期望支付日期!", "please key in expect payment date ");
return false;
}
if (this.gvDetails.Rows.Count == 0) {
PageUtility.ShowModelDlg(this.Page, "必须录入费用明细信息","please key in detail info");
return false;
}
//判断是否录入了发票
MasterData.InvoiceStatusRow row = new InvoiceStatusTableAdapter().GetDataByID(int.Parse(this.InvoiceStatusDDL.SelectedValue))[0];
if (row.NeedInvoice) {
if (this.gvInvoice.Rows.Count == 0) {
PageUtility.ShowModelDlg(this.Page, "请录入发票信息!", "please key in invoice info");
return false;
} else {
if (decimal.Parse(this.ViewState["InvoiceFeeTotal"].ToString()) < decimal.Parse(this.ViewState["TotalApplyAmount"].ToString())) {
PageUtility.ShowModelDlg(this.Page, "发票金额不得小于支付金额!", "the amount of invoice should not be less than the payment");
return false;
}
}
}
if (this.PaymentTermCtl.Text == string.Empty) {
PageUtility.ShowModelDlg(this.Page, "请录入账期!", "please key in payment terms");
return false;
}
if (string.IsNullOrEmpty(this.RemarkCtl.Text)) {
PageUtility.ShowModelDlg(this.Page, "请录入备注!", "please key in remark");
return false;
}
return true;
}
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:48,代码来源:PVSpecialApply.aspx.cs
示例12: IsSubmitValid
public bool IsSubmitValid()
{
if (this.VATRateDDL.SelectedValue != "0") {
MasterData.VatTypeRow VATRate = new MasterDataBLL().GetVatTypeById(int.Parse(this.VATRateDDL.SelectedValue))[0];
if (VATRate.HasTax && (this.AMTTaxCtl.Text == string.Empty || this.AMTTaxCtl.Text == "0")) {
PageUtility.ShowModelDlg(this.Page, "请录入税金!", "please key in tax amount");
return false;
}
} else {
PageUtility.ShowModelDlg(this.Page, "请选择税率类型!", "please select VAT Rate");
return false;
}
if (this.AmountCtl.Text == string.Empty) {
PageUtility.ShowModelDlg(this.Page, "请录入本次支付金额!", "please key in payment amount");
return false;
}
if (this.UCExpectPaymentDateCtl.SelectedDate == "") {
PageUtility.ShowModelDlg(this.Page, "请录入期望支付日期!", "please key in expect payment date ");
return false;
}
//判断是否录入了发票
MasterData.InvoiceStatusRow row = new InvoiceStatusTableAdapter().GetDataByID(int.Parse(this.InvoiceStatusDDL.SelectedValue))[0];
if (row.NeedInvoice) {
if (this.gvInvoice.Rows.Count == 0) {
PageUtility.ShowModelDlg(this.Page, "请录入发票信息!", "please key in invoice info");
return false;
} else {
decimal AmountRMB = decimal.Round(decimal.Parse(this.ViewState["ExchangeRate"].ToString()) * decimal.Parse(this.AmountCtl.Text), 2);
if (decimal.Parse(this.ViewState["InvoiceFeeTotal"].ToString()) < AmountRMB) {
PageUtility.ShowModelDlg(this.Page, "发票金额不得小于支付金额!", "the amount of invoice should not be less than the payment");
return false;
}
}
}
if (string.IsNullOrEmpty(RemarkCtl.Text)) {
PageUtility.ShowModelDlg(this.Page, "请录入备注!", "please key in remark ");
return false;
}
return true;
}
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:40,代码来源:PVApply.aspx.cs
示例13: CheckPeriod
public static bool CheckPeriod(int FormID)
{
FormDS.FormRow rowForm = new FormSaleBLL().GetFormByID(FormID)[0];
DateTime Period = DateTime.Now;
switch (rowForm.FormTypeID) {
case (int)SystemEnums.FormType.FormMarketingApply:
Period = new FormMarketingBLL().GetFormMarketingApplyByID(rowForm.FormID)[0].FPeriod;
break;
case (int)SystemEnums.FormType.RDApply:
Period = new FormRDBLL().GetFormRDApplyByID(rowForm.FormID)[0].FPeriod;
break;
case (int)SystemEnums.FormType.SaleApply:
Period = new FormSaleBLL().GetFormSaleApplyByID(rowForm.FormID)[0].FPeriod;
break;
}
MasterData.PeriodSaleDataTable tbPeriodSale = new MasterDataBLL().GetPeriodSale();
foreach (var rowPeriodSale in tbPeriodSale) {
if (rowPeriodSale.PeriodSale == Period) {
return false;
}
}
return true;
}
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:23,代码来源:CommonUtility.cs
示例14: NextButton_Click
protected void NextButton_Click(object sender, EventArgs e)
{
if (PeriodDDL.SelectedValue == "0") {
PageUtility.ShowModelDlg(this, "请选择费用期间!", "please select period");
return;
}
if (string.IsNullOrEmpty(UCCustomer.CustomerID)) {
PageUtility.ShowModelDlg(this, "请选择客户!", "please select customer");
return;
}
if (BrandDDL.SelectedValue == "0") {
PageUtility.ShowModelDlg(this, "请选择Brand!", "please select brand");
return;
}
if (ddlExpenseCategory.SelectedValue == "0") {
PageUtility.ShowModelDlg(this, "请选择费用大类!", "please select Expense Category");
return;
}
if (ExpenseSubCategoryDDL.SelectedValue == "0") {
PageUtility.ShowModelDlg(this, "请选择费用小类!", "please select Expense Sub Category");
return;
}
MasterData.ExpenseSubCategoryRow subCategory = new MasterDataBLL().GetExpenseSubCategoryById(int.Parse(this.ExpenseSubCategoryDDL.SelectedValue));
switch (subCategory.PageType) {
case (int)SystemEnums.PageType.ActivityApply:
this.Response.Redirect("~/FormSale/ActivityApply.aspx?PeriodSaleID=" + this.PeriodDDL.SelectedValue + "&CustomerID=" + this.UCCustomer.CustomerID + "&BrandID=" + BrandDDL.SelectedValue + "&ExpenseSubCategoryID=" + ExpenseSubCategoryDDL.SelectedValue + "&CurrencyID=" + this.CurrencyDDL.SelectedValue);
break;
case (int)SystemEnums.PageType.NoActivityApply:
this.Response.Redirect("~/FormSale/NoActivityApply.aspx?PeriodSaleID=" + this.PeriodDDL.SelectedValue + "&CustomerID=" + this.UCCustomer.CustomerID + "&BrandID=" + BrandDDL.SelectedValue + "&ExpenseSubCategoryID=" + ExpenseSubCategoryDDL.SelectedValue + "&CurrencyID=" + this.CurrencyDDL.SelectedValue);
break;
case (int)SystemEnums.PageType.SaleSampleRequest:
this.Response.Redirect("~/SampleRequest/SaleSampleRequestApply.aspx?PeriodSaleID=" + this.PeriodDDL.SelectedValue + "&CustomerID=" + this.UCCustomer.CustomerID + "&BrandID=" + BrandDDL.SelectedValue + "&ExpenseSubCategoryID=" + ExpenseSubCategoryDDL.SelectedValue + "&CurrencyID=" + this.CurrencyDDL.SelectedValue);
break;
}
}
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:36,代码来源:SaleApplyFirst.aspx.cs
示例15: odsExpenseDetails_Inserting
protected void odsExpenseDetails_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
{
DropDownList newExpenseItemDDL = (DropDownList)this.fvExpenseDetails.FindControl("newExpenseItemDDL");
MasterData.ExpenseItemRow expenseItem = new MasterDataBLL().GetExpenseItemById(int.Parse(newExpenseItemDDL.SelectedValue));
TextBox newShopNameCtl = (TextBox)this.fvExpenseDetails.FindControl("newShopNameCtl");
if (expenseItem.NeedShopInfo && newShopNameCtl.Text == string.Empty) {
PageUtility.ShowModelDlg(this.Page, "请录入门店信息", "please key in shop name");
e.Cancel = true;
return;
}
TextBox newAmountCtl = (TextBox)this.fvExpenseDetails.FindControl("newAmountCtl");
e.InputParameters["AmountRMB"] = decimal.Round(decimal.Parse(newAmountCtl.Text) * decimal.Parse(this.ViewState["ExchangeRate"].ToString()), 2);
if (this.ViewState["ObjectId"] != null) {
e.InputParameters["FormSaleApplyID"] = int.Parse(this.ViewState["ObjectId"].ToString());
}
}
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:17,代码来源:ActivityApply.aspx.cs
示例16: 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"];
if (new StuffUserBLL().GetCostCenterIDByPositionID(rowUserPosition.PositionId) == 0) {
this.Session["ErrorInfor"] = "未找到成本中心,请联系管理员";
Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
}
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());
}
if (Request["ObjectId"] != null) {
this.ViewState["ObjectId"] = int.Parse(Request["ObjectId"]);
if (this.Request["RejectObjectID"] == null) {
this.DeleteBtn.Visible = true;
} else {
this.DeleteBtn.Visible = false;
}
PurchaseDS.FormPORow rowFormPO = this.FormPurchaseBLL.GetFormPOByID(int.Parse(this.ViewState["ObjectId"].ToString()));
this.ViewState["ParentFormID"] = rowFormPO.ParentFormID;
this.ViewState["Period"] = rowFormPO.FPeriod.ToShortDateString();
this.PeriodCtl.Text = rowFormPO.FPeriod.ToString("yyyy-MM");
this.ViewState["VendorID"] = rowFormPO.VendorID.ToString();
this.ViewState["ItemCategoryID"] = rowFormPO.ItemCategoryID.ToString();
this.ViewState["PurchaseBudgetTypeID"] = rowFormPO.PurchaseBudgetTypeID.ToString();
this.ViewState["CurrencyID"] = rowFormPO.CurrencyID.ToString();
this.PurchaseTypeDDL.SelectedValue = rowFormPO.PurchaseTypeID.ToString();
this.ShippingTermDDL.SelectedValue = rowFormPO.ShippingTermID.ToString();
this.PaymentTermCtl.Text = rowFormPO.IsPaymentTermsNull() ? "" : rowFormPO.PaymentTerms;
if (!rowFormPO.IsCompanyIDNull()) {
this.CompanyDDL.SelectedValue = rowFormPO.CompanyID.ToString();
}
this.RemarkCtl.Text = rowFormPO.IsRemarkNull() ? "" : rowFormPO.Remark;
if (!rowFormPO.IsAttachedFileNameNull())
this.UCFileUpload.AttachmentFileName = rowFormPO.AttachedFileName;
if (!rowFormPO.IsRealAttachedFileNameNull())
this.UCFileUpload.RealAttachmentFileName = rowFormPO.RealAttachedFileName;
this.RealDeliveryAddressCtl.Text = rowFormPO.IsRealDeliveryAddressNull() ? "" : rowFormPO.RealDeliveryAddress;
new FormPODetailTableAdapter().FillByFormPOID(this.InnerDS.FormPODetail, rowFormPO.FormPOID);
} else {
this.DeleteBtn.Visible = false;
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");
}
//.........这里部分代码省略.........
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:101,代码来源:POSpecialApply.aspx.cs
示例17: 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);
MasterDataBLL mdBLL = new MasterDataBLL();
int formID = int.Parse(Request["ObjectId"]);
this.ViewState["ObjectId"] = formID;
FormDS.FormSalePaymentRow rowFormPayment = this.FormSaleBLL.GetFormSalePaymentByID(int.Parse(this.ViewState["ObjectId"].ToString()));
FormDS.FormRow rowForm = this.FormSaleBLL.GetFormByID(formID)[0];
if (rowForm.IsProcIDNull()) {
ViewState["ProcID"] = "";
} else {
ViewState["ProcID"] = rowForm.ProcID;
}
this.FormNoCtl.Text = rowForm.FormNo;
AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID);
this.StuffNameCtl.Text = CommonUtility.GetStaffFullName(applicant);
this.PositionNameCtl.Text = new OUTreeBLL().GetPositionById(rowForm.PositionID).PositionName;
if (new OUTreeBLL().GetOrganizationUnitById(rowForm.OrganizationUnitID) != null) {
this.DepartmentNameCtl.Text = new OUTreeBLL().GetOrganizationUnitById(rowForm.OrganizationUnitID).OrganizationUnitName;
}
this.StuffNoCtl.Text = applicant.IsStuffNoNull() ? "" : applicant.StuffNo;
this.AttendDateCtl.Text = applicant.AttendDate.ToShortDateString();
this.ApplyFormNoCtl.Text = this.FormSaleBLL.GetFormByID(rowFormPayment.FormSaleApplyID)[0].FormNo;
FormDS.FormSaleApplyRow rowFormApply = this.FormSaleBLL.GetFormSaleApplyByID(rowFormPayment.FormSaleApplyID)[0];
this.PeriodCtl.Text = rowFormApply.FPeriod.ToString("yyyy-MM");
MasterData.CustomerRow customer = mdBLL.GetCustomerById(rowFormApply.CustomerID)[0];
this.CustomerNameCtl.Text = customer.CustomerName;
this.CustomerChannelCtl.Text = mdBLL.GetCustomerChannelById(customer.CustomerChannelID)[0].CustomerChannelName;
this.KATypeCtl.Text = customer.IsKaTypeNull() ? "" : customer.KaType;
this.CustomerRegionCtl.Text = mdBLL.GetCustomerRegionById(customer.CustomerRegionID).CustomerRegionName;
this.CityCtl.Text = customer.City;
this.BrandCtl.Text = mdBLL.GetBrandById(rowFormApply.BrandID)[0].BrandName;
MasterData.ExpenseSubCategoryRow rowExpenseSubCategory = mdBLL.GetExpenseSubCategoryById(rowFormApply.ExpenseSubCategoryID);
this.ExpenseCategoryCtl.Text = mdBLL.GetExpenseCategoryById(rowExpenseSubCategory.ExpenseCategoryID).ExpenseCategoryName;
this.ExpenseSubCategoryCtl.Text = rowExpenseSubCategory.ExpenseSubCategoryName;
this.CurrencyCtl.Text = mdBLL.GetCurrencyByID(rowFormApply.CurrencyID).CurrencyShortName;
this.ExchangeRateCtl.Text = rowFormApply.ExchangeRate.ToString();
this.ShopNameCtl.Text = rowFormApply.IsShopNameNull() ? "" : rowFormApply.ShopName;
this.ShopCountCtl.Text = rowFormApply.IsShopCountNull() ? "" : rowFormApply.ShopCount.ToString();
this.ProjectNameCtl.Text = rowFormApply.IsProjectNameNull() ? "" : rowFormApply.ProjectName;
this.CostCenterCtl.Text = CommonUtility.GetMAACostCenterFullName(rowForm.CostCenterID);
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.ProjectDescCtl.Text = rowFormApply.IsProjectDescNull() ? "" : rowFormApply.ProjectDesc;
if (!rowFormApply.IsApplyFileNameNull())
this.UCFileUpload.AttachmentFileName = rowFormApply.ApplyFileName;
if (!rowFormApply.IsApplyRealFileNameNull())
this.UCFileUpload.RealAttachmentFileName = rowFormApply.ApplyRealFileName;
if (!rowFormPayment.IsRemarkNull()) {
this.RemarkCtl.Text = rowFormPayment.Remark;
}
if (!rowFormPayment.IsAttachedFileNameNull()) {
this.UCPaymentFile.AttachmentFileName = rowFormPayment.AttachedFileName;
}
if (!rowFormPayment.IsRealAttachedFileNameNull()) {
this.UCPaymentFile.RealAttachmentFileName = rowFormPayment.RealAttachedFileName;
}
this.InvoiceStatusCtl.Text = new InvoiceStatusTableAdapter().GetDataByID(rowFormPayment.InvoiceStatusID)[0].Name;
if (!rowFormPayment.IsVendorIDNull()) {
MasterData.VendorRow vendor = mdBLL.GetVendorByID(rowFormPayment.VendorID);
this.VendorCtl.Text = vendor.VendorName + "-" + vendor.VendorCode;
}
this.txtVatType.Text = mdBLL.GetVatTypeById(rowFormPayment.VatTypeID)[0].VatTypeName;
//PO
if (!rowFormPayment.IsFormPOIDNull()) {
FormDS.FormRow rowFormPO = this.FormSaleBLL.GetFormByID(rowFormPayment.FormPOID)[0];
this.hlPO.Text = rowFormPO.FormNo;
this.hlPO.NavigateUrl = CommonUtility.GetPOPostBackUrl(rowFormPO.FormID);
} else {
this.hlPO.Text = "无";
}
//历史单据
if (rowForm.IsRejectedFormIDNull()) {
lblRejectFormNo.Text = "无";
} else {
FormDS.FormRow rejectedForm = this.FormSaleBLL.GetFormByID(rowForm.RejectedFormID)[0];
this.lblRejectFormNo.Text = rejectedForm.FormNo;
this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/FormSale/NoActivityAdvancedPaymentApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')";
}
//明细
this.odsInvoice.SelectParameters["FormID"].DefaultValue = rowFormPayment.FormSalePaymentID.ToString();
this.odsPaymentDetails.SelectParameters["FormSalePaymentID"].DefaultValue = rowFormPayment.FormSalePaymentID.ToString();
//审批页面处理&按钮处理
AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"];
//.........这里部分代码省略.........
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:101,代码来源:NoActivityAdvancedPaymentApproval.aspx.cs
示例18: AddFormVendorApply
public void AddFormVendorApply(int? RejectedFormID, int UserID, int? ProxyStuffUserId, int? ProxyStuffPositionID, int OrganizationUnitID, int PositionID,
SystemEnums.FormType FormTypeID, SystemEnums.FormStatus StatusID, int VendorID, string VendorName, string VendorAddress, string City, string Country, string ContactName, int? VendorTypeID,
string PhoneNumber, int OneTimeVendor, int HoldVendor, string PurchasingPostalCode, string AlphaSearchKey, string PurchasingContact, string PurchasingAddress,
string PurchasingCity, string PurchasingPhoneNumber, int? BankCodeID, int? MethodPaymentID, int? PaymentTermID,
int? TransTypeID, int? VatTypeID, string BankName, string AccountNo, string BankNo, int? ACTypeID, string AttachmentFileName, string RealAttachmentFileName, string Remark, string ModifyReason, int ActionType)
{
SqlTransaction transaction = null;
try {
transaction = TableAdapterHelper.BeginTransaction(this.TAForm);
TableAdapterHelper.SetTransaction(this.TAFormVendor, transaction);
PurchaseDS.FormRow formRow = this.PurchaseDataSet.Form.NewFormRow();
if (RejectedFormID != null) {
formRow.RejectedFormID = RejectedFormID.GetValueOrDefault();
}
formRow.UserID = UserID;
UtilityBLL utility = new UtilityBLL();
string formTypeString = utility.GetFormTypeString((int)FormTypeID);
formRow.FormNo = utility.GetFormNo(formTypeString);
if (ProxyStuffUserId != null) {
formRow.ProxyUserID = ProxyStuffUserId.GetValueOrDefault();
}
if (ProxyStuffPositionID != null) {
formRow.ProxyPositionID = ProxyStuffPositionID.GetValueOrDefault();
}
formRow.InTurnUserIds = "P";//待改动
formRow.InTurnPositionIds = "P";//待改动
formRow.OrganizationUnitID = OrganizationUnitID;
formRow.PositionID = PositionID;
formRow.FormTypeID = (int)FormTypeID;
formRow.StatusID = (int)StatusID;
formRow.SubmitDate = DateTime.Now;
formRow.LastModified = DateTime.Now;
formRow.PageType = (int)SystemEnums.PageType.VendorApply;
this.PurchaseDataSet.Form.AddFormRow(formRow);
this.TAForm.Update(formRow);
//处理申请表的内容
PurchaseDS.FormVendorDataTable tbFormVendor = new PurchaseDS.FormVendorDataTable();
PurchaseDS.FormVendorRow FormVendorRow = tbFormVendor.NewFormVendorRow();
FormVendorRow.FormVendorID = formRow.FormID;
if (ActionType != 1 && VendorID > 0) {
FormVendorRow.VendorID = VendorID;
FormVendorRow.VendorCode = new MasterDataBLL().GetVendorByID(VendorID).VendorCode;
}
FormVendorRow.VendorName = VendorName;
FormVendorRow.VendorAddress = VendorAddress;
FormVendorRow.City = City;
FormVendorRow.Postal = Country;
FormVendorRow.ContactName = ContactName;
if (VendorTypeID != null) {
FormVendorRow.VendorTypeID = VendorTypeID.GetValueOrDefault();
}
FormVendorRow.PhoneNumber = PhoneNumber;
FormVendorRow.OneTimeVendor = OneTimeVendor == 1;
FormVendorRow.HoldVendor = HoldVendor == 1;
FormVendorRow.PurchaseingPostalCode = PurchasingPostalCode;
FormVendorRow.AlphaSearchKey = AlphaSearchKey;
FormVendorRow.PurchasingContact = PurchasingContact;
FormVendorRow.PurchasingAddress = PurchasingAddress;
FormVendorRow.PurchasingCity = PurchasingCity;
FormVendorRow.PurchasePhoneNumber = PurchasingPhoneNumber;
if (BankCodeID != null && BankCodeID != 0) {
FormVendorRow.BankCodeID = BankCodeID.GetValueOrDefault();
MasterData.BankCodeRow rowBankCode = new MasterDataBLL().GetBankCodeById(BankCodeID.GetValueOrDefault())[0];
FormVendorRow.BankCode = rowBankCode.BankCode + rowBankCode.Description;
}
if (MethodPaymentID != null) {
FormVendorRow.MethodPaymentID = MethodPaymentID.GetValueOrDefault();
}
if (PaymentTermID != null) {
FormVendorRow.PaymentTermID = PaymentTermID.GetValueOrDefault();
}
if (TransTypeID != null) {
FormVendorRow.TransTypeID = TransTypeID.GetValueOrDefault();
}
if (VatTypeID != null) {
FormVendorRow.VATTypeID = VatTypeID.GetValueOrDefault();
}
FormVendorRow.BankName = BankName;
FormVendorRow.AccountNo = AccountNo;
FormVendorRow.BankNo = BankNo;
if (ACTypeID != null) {
FormVendorRow.ACTypeID = ACTypeID.GetValueOrDefault();
}
FormVendorRow.AttachmentFileName = AttachmentFileName;
FormVendorRow.RealAttachmentFileName = RealAttachmentFileName;
FormVendorRow.Remark = Remark;
FormVendorRow.ModifyReason = ModifyReason;
FormVendorRow.ActionType = ActionType;
tbFormVendor.AddFormVendorRow(FormVendorRow);
this.TAFormVendor.Update(tbFormVendor);
// 正式提交或草稿
if (StatusID == SystemEnums.FormStatus.Await
|
请发表评论