// Cách tạo lỗi Exception // NotImplementedException innerException = new NotImplementedException("NoReport"); // throw new NotImplementedException("This message has been generated for a GetCallbackErrorMessage() method demonstration.", innerException); //protected override void InitializeCulture() //{ // if (!string.IsNullOrEmpty(GetDXCurrentLanguageValue())) // { // //for regional server standards // Culture = GetDXCurrentLanguageValue(); // //for DevExpress localizable strings // UICulture = GetDXCurrentLanguageValue(); // } //} protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session["Log"] == null) { HttpContext.Current.Session["Log"] = ""; } ASPxWebControl.RegisterBaseScript(this); GridViewFeaturesHelper.SetupGlobalGridViewBehavior(GridView); DemoHelper.Instance.ControlAreaMaxWidth = Unit.Pixel(1300); UpdatePageToolbarEnable(); if (!IsPostBack) { HttpContext.Current.Session["isActBloChanged_Com"] = true; HttpContext.Current.Session["isCloneRow_Com"] = false; HttpContext.Current.Session["isDetailRow_Com"] = false; List <MenuInfo> menuItems = StatusProvider.GetMenuList("Request", "Tình trạng HS"); //FiltersNavBar.BuildNavBarItems(menuItems); } if (IsCallback) { } }
protected override void OnInit(EventArgs e) { base.OnInit(e); if (!IsPostBack) { int menuID = this.MenuID; //SessionContext.Log(functionID, pageID, this.MenuID, action, message); //SessionContext.Log(0, 0, this.MenuID, "enter", ""); } if (!IsCallback) { Response.AppendHeader("Pragma", "no-cache"); Response.AppendHeader("Cache-Control", "no-cache"); Response.CacheControl = "no-cache"; Response.Expires = -1; Response.ExpiresAbsolute = new DateTime(1900, 1, 1); Response.Cache.SetCacheability(HttpCacheability.NoCache); ASPxWebControl.RegisterBaseScript(this); RegisterScript("Utilities", "~/Scripts/Utilities.js"); RegisterScript("DateUtil", "~/Scripts/DateUtil.js"); // CSS RegisterCSSLink("~/CSS/styles.css"); RegisterCSSLink("~/CSS/imStyles.css"); if (!string.IsNullOrEmpty(this.CSSLink)) { RegisterCSSLink(this.CSSLink); } if (null != loading) { loading.ClientInstanceName = "loading"; loading.Modal = true; loading.VerticalAlign = System.Web.UI.WebControls.VerticalAlign.Middle; loading.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center; loading.Text = "Processing..."; loading.ShowImage = true; Page.Controls.Add(loading); } } }
// Cách tạo lỗi Exception // NotImplementedException innerException = new NotImplementedException("NoReport"); // throw new NotImplementedException("This message has been generated for a GetCallbackErrorMessage() method demonstration.", innerException); //protected override void InitializeCulture() //{ // if (!string.IsNullOrEmpty(GetDXCurrentLanguageValue())) // { // //for regional server standards // Culture = GetDXCurrentLanguageValue(); // //for DevExpress localizable strings // UICulture = GetDXCurrentLanguageValue(); // } //} protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session["Log"] == null) { HttpContext.Current.Session["Log"] = ""; } ASPxWebControl.RegisterBaseScript(this); GridViewFeaturesHelper.SetupGlobalGridViewBehavior(GridView); DemoHelper.Instance.ControlAreaMaxWidth = Unit.Pixel(1300); UpdatePageToolbarEnable(); if (!IsPostBack) { HttpContext.Current.Session["isActBloChanged_Com"] = true; HttpContext.Current.Session["isCloneRow_Com"] = false; HttpContext.Current.Session["isDetailRow_Com"] = false; } if (IsCallback) { } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (UsingIE7CompatibilityMode) { LiteralControl ie7CompatModeMeta = RenderUtils.CreateLiteralControl(); //ie7CompatModeMeta.ID = RenderUtils.IE8CompatibilityMetaID; //ie7CompatModeMeta.Text = RenderUtils.IE8CompatibilityMetaText; Header.Controls.AddAt(0, ie7CompatModeMeta); } return; // Scripts ASPxWebControl.RegisterBaseScript(this); RegisterScript("Utilities", "~/Scripts/Utilities.js"); // CSS RegisterCSSLink("~/CSS/styles.css"); if (!string.IsNullOrEmpty(this.cssLink)) { RegisterCSSLink(this.cssLink); } }
protected void Page_Load(object sender, EventArgs e) { ASPxTreeView tvNodes = mode_cd.FindControl("tvNodes") as ASPxTreeView; List <T_CM_Bank> bankList = new BLL.T_CM_Bank().GetList().Where(p => p.Account == "现金" || p.Account == "挂账" || p.Account == "银行卡" || p.ParentID != "0").ToList(); UIHelper.TreeViewCreateNodes(bankList, tvNodes.Nodes, "0"); if (!IsPostBack) { gvw_CardType.DataSource = _cardType.GetList(new QueryInfo <T_Vip_CardType>()); gvw_CardType.DataBind(); //hfd_cust_no.Value = txt_cust_no.Text = InitCustomerCode(); //品牌 DataBindCode.DataBindComboBoxColumn(cbb_brand, " para_type='brand'"); //车型 //DataBindCode.DataBindComboBoxColumn(cbb_car_type, " para_type='car_type'"); cbb_car_type.DataSource = _carType.GetList(new QueryInfo <T_Vip_CarType>()); cbb_car_type.DataBind(); //价位 DataBindCode.DataBindComboBoxColumn(cbb_car_sales, " para_type='car_sales'"); //会员 glp_cust.DataBind(); //施工 gl_Crews.DataBind(); var caa = _caa.GetList(new QueryInfo <T_Vip_CarArea>().SetQuery("is_top", true)); cbb_car_area.DataSource = caa; cbb_car_area.DataBind(); var caa_default = caa.FirstOrDefault(p => p.is_default); if (caa_default != null) { cbb_car_area.Items.FindByValue(caa_default.name).Selected = true; } //初始数据 Consume = new Sal_Consume(); var consume = new T_Sal_Consume(); consume.SetState(EntityState.Added); consume.id = Guid.NewGuid(); consume.shop_id = UIHelpers.UserProvide.GetCurrentShopGuid(); consume.acct_no = DateTime.Now.ToString("yyyyMMddHHmmssffffff"); consume.status_cd = "5"; consume.order_type = 3; consume.add_date = consume.update_date = DateTime.Now; consume.update_opr = UIHelpers.UserProvide.GetCurrentUserName(); Consume.consume = consume; sdt_sale_amt.Value = consume.sales_amt; //sdt_rich_amt.Value = 0; sdt_paid_in.Value = consume.paid_in; sdt_give_change.Value = consume.give_change; txt_acct_no.Value = consume.acct_no; if (null != consume.amt_mode_cd) { UIHelper.TreeViewSelectedNode(tvNodes, consume.amt_mode_cd); } if (tvNodes.SelectedNode != null) { mode_cd.Text = tvNodes.SelectedNode.Text; mode_cd.KeyValue = tvNodes.SelectedNode.Name; } else { tvNodes.SelectedNode = tvNodes.Nodes[0]; mode_cd.Text = tvNodes.SelectedNode.Text; mode_cd.KeyValue = tvNodes.SelectedNode.Name; } var gvw_car_no = dde_car_no.FindControl("gvw_car_no") as ASPxGridView; } ASPxWebControl.RegisterBaseScript(Page); }
protected void Page_Load(object sender, EventArgs e) { ASPxWebControl.RegisterBaseScript(this); }