Exemple #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("OrderDelete", btnDelete);
                //ResolveDeleteButtonForGrid(btnDelete, Grid1);
                //CheckPowerWithButton("OrderDelete", 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();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //btnAddDetail.Enabled = false;
                //btnDeleteSelected2.Enabled = false;
                //btnBOM.Enabled = false;

                // 删除选中行按钮
                //btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
                btnAddDetail.OnClientClick = Window1.GetShowReference("~/OrderMag/OrderDetailNew.aspx?id=" + GetQueryValue("pid") + "&od=" + GetQueryValue("od"), "新增产品");
                CheckPowerWithButton("OrderDelete", 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("RefreshGrid1"))
                {
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int pid = GetQueryIntValue("pid");
                using (var appdb = new AppContext())
                {
                    SendOutProcessHeader item = appdb.sendoutprocessheader.Where(u => u.SN == pid).FirstOrDefault();
                    plan        = item.SendOutPlanNo;
                    orderno     = item.SendOutOrderNo;
                    saleorderno = item.SaleOrderNo;
                    orderdate   = item.SendOutDate.Value.ToString("yyyy-MM-dd");
                    provider    = item.Provider;
                }

                btnReset.OnClientClick = SF2.GetResetReference();

                LoadData();
            }
            else
            {
                string requestArg = GetRequestEventArgument(); // 此函数所在文件:PageBase.cs
                //log.Info(requestArg);
                if (requestArg.Equals("RefreshGrid2"))
                {
                    BindGrid2();
                }
                else if (requestArg.Equals("RefreshGrid"))
                {
                }
            }
        }
Exemple #4
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/"));
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                using (var appdb = new AppContext())
                {
                    IQueryable <Client> q = appdb.clients;
                    q = q.Where(u => u.subjectcode != null);
                    txtClientCode.DataSource     = q.ToList();
                    txtClientCode.DataTextField  = "subjectcode";
                    txtClientCode.DataValueField = "subjectcode";
                    txtClientCode.DataBind();
                }
                IQueryable <User> yw = DB.Users;
                txtRecOrderPerson.DataSource     = yw.ToList();
                txtRecOrderPerson.DataTextField  = "ChineseName";
                txtRecOrderPerson.DataValueField = "ChineseName";
                txtRecOrderPerson.DataBind();
                // 删除选中单元格的客户端脚本
                string deleteScript = GetDeleteScript();


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


                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("RefreshGrid1"))
                {
                    BindGrid();
                }
            }
        }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ttbSearchMessage.Text = GetQueryValue("t");
                using (var appdb = new AppContext())
                {
                    IQueryable <Client> q = appdb.clients;
                    q = q.Where(u => u.subjectcode != null);
                    txtClientCode.DataSource     = q.ToList();
                    txtClientCode.DataTextField  = "subjectcode";
                    txtClientCode.DataValueField = "subjectcode";
                    txtClientCode.DataBind();
                }
                IQueryable <User> yw = DB.Users;
                txtRecOrderPerson.DataSource     = yw.ToList();
                txtRecOrderPerson.DataTextField  = "ChineseName";
                txtRecOrderPerson.DataValueField = "ChineseName";
                txtRecOrderPerson.DataBind();
                // 删除选中单元格的客户端脚本
                string deleteScript = GetDeleteScript();

                // 新增数据初始值
                JObject defaultObj = new JObject();
                defaultObj.Add("OrderNo", "");
                DayOfWeek dw = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).DayOfWeek;
                string    ss = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(dw);
                defaultObj.Add("ClientOrderNo", "");
                defaultObj.Add("LotNo", "");
                defaultObj.Add("ClientCode", "");
                defaultObj.Add("RecOrderPerson", "");
                defaultObj.Add("RecOrderDate", DateTime.Now.ToString("yyyy-MM-dd"));
                defaultObj.Add("SendOrderDate", "");
                defaultObj.Add("OutGoodsDate", "");
                defaultObj.Add("Inputer", User.Identity.Name);
                defaultObj.Add("InputerDate", DateTime.Now.ToString("yyyy-MM-dd"));

                defaultObj.Add("deleteField", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(FineUIPro.Icon.Delete)));

                // 在第一行新增一条数据
                btnNew.OnClientClick       = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);
                btnAddDetail.Enabled       = false;
                btnDeleteSelected2.Enabled = false;
                btnBOM.Enabled             = false;
                btnHeaderBom.Enabled       = false;
                //txtOrderNo.Attributes.Add("onkeydown", "if (window.event.keyCode==13) window.event.keyCode=9;");

                // 删除选中行按钮
                //btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
                CheckPowerWithButton("OrderDelete", btnDelete);
                ResolveDeleteButtonForGrid(btnDelete, Grid1);
                CheckPowerWithButton("OrderDelete", 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();
                }
            }
        }