protected void OpenForm(int formID) { FormTableAdapter taForm = new FormTableAdapter(); taForm.FillByID(this.InnerDS.Form, formID); FormDS.FormRow rowForm = this.InnerDS.Form[0]; FormApplyTableAdapter taFormApply = new FormApplyTableAdapter(); taFormApply.FillByID(this.InnerDS.FormApply, formID); FormDS.FormApplyRow rowFormApply = this.InnerDS.FormApply[0]; //赋值 this.ViewState["BeginPeriod"] = rowFormApply.BeginPeriod.ToShortDateString(); this.ViewState["EndPeriod"] = rowFormApply.EndPeriod.ToShortDateString(); this.BeginPeriodCtl.Text = rowFormApply.BeginPeriod.ToString("yyyy-MM"); this.EndPeriodCtl.Text = rowFormApply.EndPeriod.ToString("yyyy-MM"); this.ViewState["ExpenseSubCategoryID"] = rowFormApply.ExpenseSubCategoryID.ToString(); this.ExpenseSubCategoryCtl.Text = new MasterDataBLL().GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID); this.ViewState["CustomerID"] = rowFormApply.CustomerID.ToString(); ERS.CustomerRow customer = new MasterDataBLL().GetCustomerById(rowFormApply.CustomerID); this.CustomerNameCtl.Text = customer.CustomerName; //this.CustomerTypeCtl.Text = new MasterDataBLL().GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName; this.odsShop.SelectParameters["CustomerID"].DefaultValue = customer.CustomerID.ToString(); this.ShopDDL.SelectedValue = rowFormApply.ShopID.ToString(); this.PaymentTypeDDL.SelectedValue = rowFormApply.PaymentTypeID.ToString(); if (!rowFormApply.IsContractNoNull()) { this.ContractNoCtl.Text = rowFormApply.ContractNo; } if (!rowFormApply.IsRemarkNull()) { this.RemarkCtl.Text = rowFormApply.Remark; } if (!rowFormApply.IsAttachedFileNameNull()) { this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName; } if (!rowFormApply.IsRealAttachedFileNameNull()) { this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName; } if (!rowFormApply.IsFormApplyNameNull()) { this.txtFormApplyName.Text = rowFormApply.FormApplyName.ToString(); } }
protected void OpenForm(int formID) { FormTableAdapter taForm = new FormTableAdapter(); taForm.FillByID(this.InnerDS.Form, formID); FormDS.FormRow rowForm = this.InnerDS.Form[0]; FormApplyTableAdapter taFormApply = new FormApplyTableAdapter(); taFormApply.FillByID(this.InnerDS.FormApply, formID); FormDS.FormApplyRow rowFormApply = this.InnerDS.FormApply[0]; //赋值 this.ViewState["BeginPeriod"] = rowFormApply.BeginPeriod.ToShortDateString(); this.ViewState["EndPeriod"] = rowFormApply.EndPeriod.ToShortDateString(); this.BeginPeriodCtl.Text = rowFormApply.BeginPeriod.ToString("yyyy-MM"); this.EndPeriodCtl.Text = rowFormApply.EndPeriod.ToString("yyyy-MM"); this.ViewState["ExpenseSubCategoryID"] = rowFormApply.ExpenseSubCategoryID.ToString(); this.ExpenseSubCategoryCtl.Text = new MasterDataBLL().GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID); this.ViewState["CustomerID"] = rowFormApply.CustomerID.ToString(); ERS.CustomerRow customer = new MasterDataBLL().GetCustomerById(rowFormApply.CustomerID); this.CustomerNameCtl.Text = customer.CustomerName; //this.CustomerTypeCtl.Text = new MasterDataBLL().GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName; this.odsShop.SelectParameters["CustomerID"].DefaultValue = customer.CustomerID.ToString(); this.ViewState["PromotionPriceType"] = rowFormApply.PromotionPriceType.ToString(); this.ShopDDL.SelectedValue = rowFormApply.ShopID.ToString(); this.PaymentTypeDDL.SelectedValue = rowFormApply.PaymentTypeID.ToString(); if (!rowFormApply.IsContractNoNull()) { this.ContractNoCtl.Text = rowFormApply.ContractNo; } if (!rowFormApply.IsRemarkNull()) { this.RemarkCtl.Text = rowFormApply.Remark; } if (!rowFormApply.IsAttachedFileNameNull()) { this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName; } if (!rowFormApply.IsRealAttachedFileNameNull()) { this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName; } if (!rowFormApply.IsPromotionBeginDateNull()) { this.UCPromotionBegin.SelectedDate = rowFormApply.PromotionBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsPromotionEndDateNull()) { this.UCPromotionEnd.SelectedDate = rowFormApply.PromotionEndDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsDeliveryBeginDateNull()) { this.UCDeliveryBegin.SelectedDate = rowFormApply.DeliveryBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsDeliveryEndDateNull()) { this.UCDeliveryEnd.SelectedDate = rowFormApply.DeliveryEndDate.ToString("yyyy-MM-dd"); } this.PromotionScopeDDL.SelectedValue = rowFormApply.PromotionScopeID.ToString(); this.PromotionTypeDDL.SelectedValue = rowFormApply.PromotionTypeID.ToString(); if (!rowFormApply.IsPromotionDescNull()) { this.PromotionDescCtl.Text = rowFormApply.PromotionDesc; } this.ShelfTypeDDL.SelectedValue = rowFormApply.ShelfTypeID.ToString(); if (!rowFormApply.IsFirstVolumeNull()) { this.FirstVolumeCtl.Text = rowFormApply.FirstVolume.ToString(); } if (!rowFormApply.IsSecondVolumeNull()) { this.SecondVolumeCtl.Text = rowFormApply.SecondVolume.ToString(); } if (!rowFormApply.IsThirdVolumeNull()) { this.ThirdVolumeCtl.Text = rowFormApply.ThirdVolume.ToString(); } if (!rowFormApply.IsFormApplyNameNull()) { this.txtFormApplyName.Text = rowFormApply.FormApplyName; } if (!rowFormApply.IsReimburseRequirementsNull()) { int ReimburseRequirement = rowFormApply.ReimburseRequirements; if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Picture) == (int)SystemEnums.ReimburseRequirements.Picture) { chkListReimburseRequirements.Items[0].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Agreement) == (int)SystemEnums.ReimburseRequirements.Agreement) { chkListReimburseRequirements.Items[1].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.DeliveryOrder) == (int)SystemEnums.ReimburseRequirements.DeliveryOrder) { chkListReimburseRequirements.Items[2].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Contract) == (int)SystemEnums.ReimburseRequirements.Contract) { chkListReimburseRequirements.Items[3].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.DM) == (int)SystemEnums.ReimburseRequirements.DM) { chkListReimburseRequirements.Items[4].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Other) == (int)SystemEnums.ReimburseRequirements.Other) { chkListReimburseRequirements.Items[5].Selected = true; } } this.ViewState["PromotionPriceType"] = rowFormApply.PromotionPriceType.ToString(); // 打开明细表 FormApplySKUDetailTableAdapter taSKU = new FormApplySKUDetailTableAdapter(); taSKU.FillByFormApplyID(this.InnerDS.FormApplySKUDetail, formID); FormApplyExpenseDetailTableAdapter taExpense = new FormApplyExpenseDetailTableAdapter(); taExpense.FillByFormApplyID(this.InnerDS.FormApplyExpenseDetail, formID); new FormApplySplitRateTableAdapter().FillByApplyID(InnerDS.FormApplySplitRate, formID); }
protected void OpenForm(int formID) { FormTableAdapter taForm = new FormTableAdapter(); taForm.FillByID(this.InnerDS.Form, formID); FormDS.FormRow rowForm = this.InnerDS.Form[0]; FormApplyTableAdapter taFormApply = new FormApplyTableAdapter(); taFormApply.FillByID(this.InnerDS.FormApply, formID); FormDS.FormApplyRow rowFormApply = this.InnerDS.FormApply[0]; //��ֵ this.ViewState["BeginPeriod"] = rowFormApply.BeginPeriod.ToShortDateString(); this.ViewState["EndPeriod"] = rowFormApply.EndPeriod.ToShortDateString(); this.BeginPeriodCtl.Text = rowFormApply.BeginPeriod.ToString("yyyy-MM"); this.EndPeriodCtl.Text = rowFormApply.EndPeriod.ToString("yyyy-MM"); this.ViewState["ExpenseSubCategoryID"] = rowFormApply.ExpenseSubCategoryID.ToString(); this.ExpenseSubCategoryCtl.Text = new MasterDataBLL().GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID); this.ViewState["CustomerID"] = rowFormApply.CustomerID.ToString(); ERS.CustomerRow customer = new MasterDataBLL().GetCustomerById(rowFormApply.CustomerID); this.CustomerNameCtl.Text = customer.CustomerName; //this.CustomerTypeCtl.Text = new MasterDataBLL().GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName; this.odsShop.SelectParameters["CustomerID"].DefaultValue = customer.CustomerID.ToString(); this.ShopDDL.SelectedValue = rowFormApply.ShopID.ToString(); this.PaymentTypeDDL.SelectedValue = rowFormApply.PaymentTypeID.ToString(); if (!rowFormApply.IsContractNoNull()) { this.ContractNoCtl.Text = rowFormApply.ContractNo; } if (!rowFormApply.IsRemarkNull()) { this.RemarkCtl.Text = rowFormApply.Remark; } if (!rowFormApply.IsAttachedFileNameNull()) { this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName; } if (!rowFormApply.IsRealAttachedFileNameNull()) { this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName; } if (!rowFormApply.IsFormApplyNameNull()) { this.txtFormApplyName.Text = rowFormApply.FormApplyName.ToString(); } }
protected void OpenForm(int formID) { FormTableAdapter taForm = new FormTableAdapter(); taForm.FillByID(this.InnerDS.Form, formID); FormDS.FormRow rowForm = this.InnerDS.Form[0]; FormApplyTableAdapter taFormApply = new FormApplyTableAdapter(); taFormApply.FillByID(this.InnerDS.FormApply, formID); FormDS.FormApplyRow rowFormApply = this.InnerDS.FormApply[0]; //��ֵ this.ViewState["BeginPeriod"] = rowFormApply.BeginPeriod.ToShortDateString(); this.ViewState["EndPeriod"] = rowFormApply.EndPeriod.ToShortDateString(); this.BeginPeriodCtl.Text = rowFormApply.BeginPeriod.ToString("yyyy-MM"); this.EndPeriodCtl.Text = rowFormApply.EndPeriod.ToString("yyyy-MM"); this.ViewState["ExpenseSubCategoryID"] = rowFormApply.ExpenseSubCategoryID.ToString(); this.ExpenseSubCategoryCtl.Text = new MasterDataBLL().GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID); this.ViewState["CustomerID"] = rowFormApply.CustomerID.ToString(); ERS.CustomerRow customer = new MasterDataBLL().GetCustomerById(rowFormApply.CustomerID); this.CustomerNameCtl.Text = customer.CustomerName; //this.CustomerTypeCtl.Text = new MasterDataBLL().GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName; this.odsShop.SelectParameters["CustomerID"].DefaultValue = customer.CustomerID.ToString(); this.ShopDDL.SelectedValue = rowFormApply.ShopID.ToString(); this.PaymentTypeDDL.SelectedValue = rowFormApply.PaymentTypeID.ToString(); if (!rowFormApply.IsContractNoNull()) { this.ContractNoCtl.Text = rowFormApply.ContractNo; } if (!rowFormApply.IsRemarkNull()) { this.RemarkCtl.Text = rowFormApply.Remark; } if (!rowFormApply.IsAttachedFileNameNull()) this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName; if (!rowFormApply.IsRealAttachedFileNameNull()) this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName; if (!rowFormApply.IsPromotionBeginDateNull()) { this.UCPromotionBegin.SelectedDate = rowFormApply.PromotionBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsPromotionEndDateNull()) { this.UCPromotionEnd.SelectedDate = rowFormApply.PromotionEndDate.ToString("yyyy-MM-dd"); } this.PromotionScopeDDL.SelectedValue = rowFormApply.PromotionScopeID.ToString(); this.PromotionTypeDDL.SelectedValue = rowFormApply.PromotionTypeID.ToString(); if (!rowFormApply.IsPromotionDescNull()) { this.PromotionDescCtl.Text = rowFormApply.PromotionDesc; } this.ShelfTypeDDL.SelectedValue = rowFormApply.ShelfTypeID.ToString(); if (!rowFormApply.IsFirstVolumeNull()) { this.FirstVolumeCtl.Text = rowFormApply.FirstVolume.ToString(); } if (!rowFormApply.IsSecondVolumeNull()) { this.SecondVolumeCtl.Text = rowFormApply.SecondVolume.ToString(); } if (!rowFormApply.IsThirdVolumeNull()) { this.ThirdVolumeCtl.Text = rowFormApply.ThirdVolume.ToString(); } if (!rowFormApply.IsEstimatedSaleVolumeNull()) { this.txtEstimatedSaleVolume.Text = rowFormApply.EstimatedSaleVolume.ToString(); } if (!rowFormApply.IsPackageUnitPriceNull()) { this.txtPackageUnitPrice.Text = rowFormApply.PackageUnitPrice.ToString("N"); } if (!rowFormApply.IsFormApplyNameNull()) { this.txtFormApplyName.Text = rowFormApply.FormApplyName.ToString(); } if (!rowFormApply.IsReimburseRequirementsNull()) { int ReimburseRequirement = rowFormApply.ReimburseRequirements; if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Picture) == (int)SystemEnums.ReimburseRequirements.Picture) { chkListReimburseRequirements.Items[0].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Agreement) == (int)SystemEnums.ReimburseRequirements.Agreement) { chkListReimburseRequirements.Items[1].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.DeliveryOrder) == (int)SystemEnums.ReimburseRequirements.DeliveryOrder) { chkListReimburseRequirements.Items[2].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Contract) == (int)SystemEnums.ReimburseRequirements.Contract) { chkListReimburseRequirements.Items[3].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.DM) == (int)SystemEnums.ReimburseRequirements.DM) { chkListReimburseRequirements.Items[4].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Other) == (int)SystemEnums.ReimburseRequirements.Other) { chkListReimburseRequirements.Items[5].Selected = true; } } // ����ϸ�� FormApplyDetailViewTableAdapter taDetail = new FormApplyDetailViewTableAdapter(); taDetail.FillByFormID(this.InnerDS.FormApplyDetailView, formID); new FormApplySplitRateTableAdapter().FillByApplyID(InnerDS.FormApplySplitRate, formID); }