Пример #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();
            }
        }
Пример #2
0
        private void btnCustomMasterTableMasterIdSave_Click(object sender, System.EventArgs e)
        {
            string
                Value = TextBoxCustomMasterTableMasterId.Text.Trim();

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

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

            DataRow
                row;

            row             = DS.Tables["CustomMasterTable"].NewRow();
            row["MasterId"] = Convert.ToInt32(Value);
            DS.Tables["CustomMasterTable"].Rows.Add(row);
            BindCustomDSCustomMasterTable();
        }