Example #1
0
        public void GetFree()
        {
            DataTable dtzyx1 = tb_matrl_main.GetFree(ltlstl_grd.Text, dropstd.SelectedItem.Value).Tables[0];

            if (dtzyx1.Rows.Count > 0)
            {
                dropzyx1.DataSource     = dtzyx1;
                dropzyx1.DataTextField  = "ZYX1";
                dropzyx1.DataValueField = "ZYX1";
                dropzyx1.DataBind();
            }
            else
            {
                dropzyx1.DataSource = null;
                dropzyx1.DataBind();
            }

            DataTable dtzyx2 = tb_matrl_main.GetFree2(ltlstl_grd.Text, dropstd.SelectedItem.Value).Tables[0];

            if (dtzyx2.Rows.Count > 0)
            {
                dropzyx2.DataSource     = dtzyx2;
                dropzyx2.DataTextField  = "ZYX2";
                dropzyx2.DataValueField = "ZYX2";
                dropzyx2.DataBind();
            }
            else
            {
                dropzyx2.DataSource = null;
                dropzyx2.DataBind();
            }
        }