protected void Page_Load(object sender, EventArgs e) { RegisterOEMSkins("form.css"); RegisterOEMSkins("page.css"); if (!IsPostBack) { this.txtPubStartTime.Text = DateTime.Today.AddMonths(-1).ToString("yyyy-MM-dd"); this.txtPubEndTime.Text = DateTime.Today.ToString("yyyy-MM-dd"); var airline = from item in Service.FoundationService.Airlines select new { text = item.Code.Value + "-" + item.ShortName, value = item.Code.Value }; this.ddlAirline.DataSource = airline; this.ddlAirline.DataTextField = "text"; this.ddlAirline.DataValueField = "value"; this.ddlAirline.DataBind(); this.ddlAirline.Items.Insert(0, new ListItem { Value = "", Text = "-请选择-" }); var specialType = Enum.GetValues(typeof(SpecialProductType)) as SpecialProductType[]; foreach (var item in specialType) { ddlSpecialType.Items.Add(new ListItem(item.GetDescription(), ((int)item).ToString())); } ddlSpecialType.Items.Insert(0, new ListItem("-请选择-", "")); //AgentCompany.InitCompanies(CompanyService.GetCompanies(CompanyType.Provider | CompanyType.Supplier)); AgentCompany.SetCompanyType(CompanyType.Provider | CompanyType.Supplier); } this.pager.CurrentPageChanged += pager_CurrentPageChanged; }
/// <summary> /// 查询信息 /// </summary> /// <param name="oid">主键</param> /// <returns></returns> public AgentCompany Retrieve(Guid oid) { AgentCompany entity = new AgentCompany(); entity.AgentID = oid; return((AgentCompany)entity.Retrieve()); }
/// <summary> /// 删除 /// </summary> /// <param name="oid">主键</param> /// <returns></returns> public int Delete(Guid oid) { AgentCompany entity = new AgentCompany(); entity.AgentID = oid; return(entity.Delete()); }
public AjaxResult Delete(AgentCompany entity) { entity.Delete(); return(new AjaxResult(ResultStatus.OK) { Status = ResultStatus.OK }); }
private void initData() { //申请单状态 var applyTypeValues = Enum.GetValues(typeof(ApplyformType)) as ApplyformType[]; string strApplyType = "<li><a href='javascript:void(0)'>综合查询</a></li>"; foreach (var item in applyTypeValues) { strApplyType += "<li><a href='javascript:void(0)'>" + item.GetDescription() + "</a></li>"; } this.applyType.InnerHtml = strApplyType; //改期状态 var postPoneStatus = Service.Order.StatusService.GetRolePostponeApplyformStatus(OrderRole.Platform).Values.Distinct(); string strPosponeStatus = "<li><a href='javascript:void(0)' class='curr'>全部</a></li>"; foreach (var item in postPoneStatus) { strPosponeStatus += "<li><a href='javascript:void(0)'>" + item + "</a></li>"; } this.posponeStauts.InnerHtml = strPosponeStatus; //退票类型 var refundTypeValue = Enum.GetValues(typeof(RefundType)) as RefundType[]; string strRefundType = "<li><a href='javascript:void(0)' class='curr'>全部</a></li>"; foreach (var item in refundTypeValue) { strRefundType += "<li><a href='javascript:void(0)'>" + item.GetDescription() + "</a></li>"; } refundType.InnerHtml = strRefundType; //退/废票状态 var refundStatus = Service.Order.StatusService.GetRoleRefundApplyformStatus(OrderRole.Platform).Values.Distinct(); string strRefundStatus = "<li><a href='javascript:void(0)' class='curr'>全部</a></li>"; foreach (var item in refundStatus) { strRefundStatus += "<li><a href='javascript:void(0)'>" + item + "</a></li>"; } this.refundStatus.InnerHtml = strRefundStatus; this.hfdRefundType.Value = "全部"; this.hfdApplyformType.Value = "综合查询"; this.refundType.Style.Add(HtmlTextWriterStyle.Display, "none"); this.posponeStauts.Style.Add(HtmlTextWriterStyle.Display, "none"); this.refundStatus.Style.Add(HtmlTextWriterStyle.Display, "none"); //var companies = CompanyService.GetCompanies(CompanyType.Provider | CompanyType.Purchaser | CompanyType.Supplier); AgentCompany.SetCompanyType(CompanyType.Provider); PurchaseCompany.SetCompanyType(CompanyType.Provider | CompanyType.Purchaser | CompanyType.Supplier); SupplierCompany.SetCompanyType(CompanyType.Supplier); }
/// <summary> /// 更新 /// </summary> /// <param name="entity">实体</param> /// <returns></returns> public AjaxResult Update(AgentCompany entity) { AjaxResult res = new AjaxResult(ResultStatus.OK); entity.Valid(); if (entity.Update() == 1) { res.Status = ResultStatus.OK; } else { res.Status = ResultStatus.NO; res.Message = "更新失败!"; } return(res); }
void initData() { AgentCompany.InitCompanies(CompanyService.GetCompanies(p => p.CompanyType == CompanyType.Provider)); var airline = from item in Service.FoundationService.Airlines select new { text = item.Code.Value + "-" + item.ShortName, value = item.Code.Value }; this.ddlAirline.DataSource = airline; this.ddlAirline.DataTextField = "text"; this.ddlAirline.DataValueField = "value"; this.ddlAirline.DataBind(); this.ddlAirline.Items.Insert(0, new ListItem { Value = "", Text = "-请选择-" }); }
/// <summary> /// 插入 /// </summary> /// <param name="entity">实体</param> /// <returns></returns> public AjaxResult Insert(AgentCompany entity) { AjaxResult res = new AjaxResult(ResultStatus.OK); entity.AgentID = (entity.AgentID == Guid.Empty ? Guid.NewGuid() : entity.AgentID); entity.Valid(); entity.CreatedOn = DateTime.Now; entity.CreatedBy = UserInfoBLL.GetCurrentUserGuid(); if (entity.Insert() == 1) { res.Status = ResultStatus.OK; } else { res.Status = ResultStatus.NO; res.Message = "新增失败!"; } return(res); }
private void InitData() { this.txtPubStartTime.Text = DateTime.Today.AddMonths(-1).ToString("yyyy-MM-dd"); this.txtPubEndTime.Text = DateTime.Today.ToString("yyyy-MM-dd"); //AgentCompany.InitCompanies(CompanyService.GetCompanies(CompanyType.Provider)); AgentCompany.SetCompanyType(CompanyType.Provider); var airline = from item in Service.FoundationService.Airlines select new { text = item.Code.Value + "-" + item.ShortName, value = item.Code.Value }; this.ddlAirline.DataSource = airline; this.ddlAirline.DataTextField = "text"; this.ddlAirline.DataValueField = "value"; this.ddlAirline.DataBind(); this.ddlAirline.Items.Insert(0, new ListItem { Value = "", Text = "-请选择-" }); }
public string Update(AgentCompany entity) { entity.ModifiedOn = DateTime.Now; entity.ModifiedBy = UserInfoBLL.GetCurrentUserGuid(); return(entity.Update().ToString()); }
public string Insert(AgentCompany entity) { return(bll.Insert(entity).ToString()); }
public bool AgentCompanyIs(AgentCompany company) { return(company != null && Agent != null && Agent.Company.Equals(company)); }