Esempio n. 1
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            MainDS
                MainDataSet = null;

            if ((MainDataSet = (MainDS)Session["MainDS"]) == null)
            {
                MainDataSet = new MainDS();
                Session.Add("MainDS", MainDataSet);
            }

            CustomDS
                CustomDataSet = null;

            if ((CustomDataSet = (CustomDS)Session["CustomDS"]) == null)
            {
                CustomDataSet = new CustomDS();
                Session.Add("CustomDS", CustomDataSet);
            }

            LiteralBeginJS.Text = "\n<SCRIPT TYPE=\"text/javascript\">\n<!--\n";
            LiteralJS.Text      = "var " + ArrayName + "=new Array();";
            LiteralEndJS.Text   = "\n// -->\n</SCRIPT>";

            if (!IsPostBack)
            {
                DataGridWithPagesBind();
            }
        }
Esempio n. 2
0
        private void btnMasterTableValueSave_Click(object sender, System.EventArgs e)
        {
            string
                Value = TextBoxMasterTableValue.Text.Trim();

            if (Value.Length == 0)
            {
                return;
            }

            MainDS
                DS = (MainDS)Session["MainDS"];

            DataRow
                row;

            row          = DS.Tables["MasterTable"].NewRow();
            row["Value"] = Value;
            DS.Tables["MasterTable"].Rows.Add(row);
            BindMainDSMasterTable();
        }
Esempio n. 3
0
        private void btnDetailTableValueSave_Click(object sender, System.EventArgs e)
        {
            string
                Value = TextBoxDetailTableValue.Text.Trim();

            if (Value.Length == 0)
            {
                return;
            }

            MainDS
                DS = (MainDS)Session["MainDS"];

            DataRow
                row;

            row          = DS.Tables["DetailTable"].NewRow();
            row["Id"]    = Convert.ToInt32(TextBoxDetailTableId.Text);
            row["SubId"] = Convert.ToInt32(TextBoxDetailTableSubId.Text);
            row["Value"] = Value;
            DS.Tables["DetailTable"].Rows.Add(row);
            BindMainDSDetailTable();
        }