コード例 #1
0
        protected void btnGo_Click(object sender, EventArgs e)
        {
            var GridResult = (GridView)UpdatePanel1.FindControl("GridResult");
            var GridTotal  = (GridView)UpdatePanel1.FindControl("GridTotal");

            if (Page.IsPostBack)
            {
                var con = new SqlConnection(strConnection);
                var cmd =
                    new SqlCommand(
                        "Select PRODUCT,VOLUME from QStock where NAME = '" + DropName.SelectedValue.Trim() + "'", con);
                var cmdT =
                    new SqlCommand(
                        "Select PRODUCT,VOLUME from QStock where NAME = '" + DropName.SelectedValue.Trim() + "'", con);
                //var result = cmd.ToString();
                var Adpt     = new SqlDataAdapter(cmd);
                var AdpTotal = new SqlDataAdapter(cmdT);
                var dt       = new DataTable();
                var dtotal   = new DataTable();
                Adpt.Fill(dt);
                AdpTotal.Fill(dtotal);
                GridResult.DataSource = dt;
                GridResult.DataBind();
                GridTotal.DataSource = dtotal;
                GridTotal.DataBind();
                //LabelProduct.Text = "Volume:" + result;

                GridExpEntries.DataBind();
                GridLocEntries.DataBind();
            }
            checkExpAll();
            checkLocAll();
        }
コード例 #2
0
        protected void AutoRefreshTimer_Tick(object sender, EventArgs e)
        {
            GridLocEntries.DataBind();
            GridExpEntries.DataBind();

            if (IsPostBack)
            {
                QueueView();
            }
        }
コード例 #3
0
 protected void AutoRefreshTimer_Tick(object sender, EventArgs e)
 {
     if (IsPostBack)
     {
         checkExpAll();
         checkLocAll();
     }
     if (!Page.IsPostBack)
     {
         checkExpAll();
         checkLocAll();
     }
     GridExpEntries.DataBind();
     GridLocEntries.DataBind();
 }
コード例 #4
0
        protected void DropEntLoc_SelectedIndexChanged(object sender, EventArgs e)
        {
            var strSql   = new StringBuilder(string.Empty);
            var con      = new SqlConnection(strConnection);
            var conQueue = new SqlConnection(strConnection);
            var cmd      = new SqlCommand();

            foreach (GridViewRow row in GridLocEntries.Rows)
            {
                for (var i = 0; i < GridLocEntries.Rows.Count; i++)
                {
                    var ChkEnt =
                        (GridLocEntries.Rows[i].Cells[10].FindControl("DropEntLoc") as DropDownList).SelectedValue;
                    var strID = GridLocEntries.Rows[i].Cells[9].Text;

                    DropDownSave(con, conQueue, cmd, ChkEnt, strID);
                }
            }
            GridLocEntries.DataBind();
        }
コード例 #5
0
        protected void CheckLocApp_Click(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                var strSql   = new StringBuilder(string.Empty);
                var con      = new SqlConnection(strConnection);
                var conQueue = new SqlConnection(strConnection);
                var cmd      = new SqlCommand();

                var ChecklocApp = (Button)sender;
                var grdRow1     = (GridViewRow)ChecklocApp.NamingContainer;
                var DropEntExp  = (DropDownList)grdRow1.FindControl("DropLocExp");
                var lblID       = (Label)grdRow1.FindControl("Label1");

                var cusTime = DateTime.Now;
                var named   = User.Identity.Name;

                ApproveOrder(con, conQueue, cmd, lblID, cusTime, named);

                GridLocEntries.DataBind();
            }
        }