本文整理汇总了C#中BusinessObjects.MasterDataBLL类的典型用法代码示例。如果您正苦于以下问题:C# MasterDataBLL类的具体用法?C# MasterDataBLL怎么用?C# MasterDataBLL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MasterDataBLL类属于BusinessObjects命名空间,在下文中一共展示了MasterDataBLL类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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");
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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);
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
}
示例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());
}
}