예제 #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 DropEntExp_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 GridExpEntries.Rows)
            {
                for (var i = 0; i < GridExpEntries.Rows.Count; i++)
                {
                    var ChkEnt =
                        (GridExpEntries.Rows[i].Cells[10].FindControl("DropEntExp") as DropDownList).SelectedValue;
                    var strID = GridExpEntries.Rows[i].Cells[9].Text;

                    DropDownSave(con, conQueue, cmd, ChkEnt, strID);
                }
            }
            GridExpEntries.DataBind();
        }
예제 #5
0
        protected void CheckExpApp_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 CheckExpApp = (Button)sender;
                var grdRow      = (GridViewRow)CheckExpApp.NamingContainer;
                var DropEntExp  = (DropDownList)grdRow.FindControl("DropEntExp");
                var lblID       = (Label)grdRow.FindControl("Label1");

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

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

                GridExpEntries.DataBind();
            }
        }