Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //txtOrderNo.Attributes.Add("onkeydown", "if (window.event.keyCode==13) window.event.keyCode=9;");

                // 删除选中行按钮
                //btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
                //CheckPowerWithButton("ClientProviderOrderDelete", btnDelete);
                //ResolveDeleteButtonForGrid(btnDelete, Grid1);
                //CheckPowerWithButton("ClientProviderOrderDelete", btnDeleteSelected2);
                //ResolveDeleteButtonForGrid(btnDeleteSelected2, Grid2);

                btnReset.OnClientClick = SF2.GetResetReference();
                btnClear.OnClientClick = SF1.GetResetReference();
                LoadData();
            }
            else
            {
                string requestArg = GetRequestEventArgument(); // 此函数所在文件:PageBase.cs
                //log.Info(requestArg);
                if (requestArg.Equals("RefreshGrid2"))
                {
                    BindGrid2();
                }
                else if (requestArg.Equals("RefreshGrid"))
                {
                    BindGrid();
                }
            }
            FileOper.delfile(Server.MapPath("~/pdf/"));
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int pid = GetQueryIntValue("pid");
                using (var appdb = new AppContext())
                {
                    PurchaseOrderHeader item = appdb.purchaseorderHeader.Where(u => u.SN == pid).FirstOrDefault();
                    plan = item.PurPlanNo;
                    orderno = item.PurOrderNo;
                    saleorderno = item.SaleOrderNo;
                    orderdate = item.PurDate.Value.ToString("yyyy-MM-dd");
                    provider = item.Provider;
                    contactman = item.ContactMan;
                    tel = item.Tel;
                    fax = item.Fax;
                }

                //txtOrderNo.Attributes.Add("onkeydown", "if (window.event.keyCode==13) window.event.keyCode=9;");

                // 删除选中行按钮
                //btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
                //CheckPowerWithButton("PurChaseOrderDelete", btnDelete);
                //ResolveDeleteButtonForGrid(btnDelete, Grid1);
                //CheckPowerWithButton("PurChaseOrderDelete", btnDeleteSelected2);
                //ResolveDeleteButtonForGrid(btnDeleteSelected2, Grid2);

                btnReset.OnClientClick = SF2.GetResetReference();

                LoadData();
            }
            else
            {
                string requestArg = GetRequestEventArgument(); // 此函数所在文件:PageBase.cs
                //log.Info(requestArg);
                if (requestArg.Equals("RefreshGrid2"))
                {
                    BindGrid2();
                }
                else if (requestArg.Equals("RefreshGrid"))
                {

                }
            }
            FileOper.delfile(Server.MapPath("~/pdf/"));
        }