Exemplo n.º 1
0
        private void CreateTab()
        {
            BLL.DataCenterBiz biz = new BLL.DataCenterBiz();
            var res = biz.GetConfigPetitionLicenseType("");

            tbcDynamic = new AjaxControlToolkit.TabContainer();

            for (int i = 0; i < res.DataResponse.Count(); i++)
            {
                TabPanel tbpnlProcessCategory = new TabPanel();
                tbpnlProcessCategory.HeaderText = res.DataResponse[i].Name;
                tbpnlProcessCategory.ID         = "Tab" + i.ToString();

                var ls = biz.GetDocumentLicenseConfigByPetitionType(res.DataResponse[i].Id);
                IEnumerable <DTO.ConfigDocument> configs = ls.DataResponse;

                var tmp = configs.GroupBy(c => c.LICENSE_TYPE_CODE);

                Class.CustomConfigTable configTagle = new Class.CustomConfigTable(res.DataResponse[i].Id);

                configTagle.LinkButtonDelete_Click += new EventHandler(LinkButtonDelete_Click);
                tbpnlProcessCategory.Controls.Add(configTagle);

                tbcDynamic.Tabs.Add(tbpnlProcessCategory);
                TabSettingLicense.Controls.Add(tbcDynamic);
                TabSetting.Controls.Add(TabSettingLicense);
                TabSetting.Controls.Add(TabSettingRegister);
            }
        }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Class.CustomConfigTable ConfigTable1 = new Class.CustomConfigTable("11");
         ConfigTable1.PetitionTypeCode = "11";
         ConfigTable1.ViewStateMode    = System.Web.UI.ViewStateMode.Enabled;
         DTO.UserProfile user = new DTO.UserProfile();
         user.Name = "pichit";
         Session[PageList.UserProfile] = user;
         Session["ConfigTable1"]       = ConfigTable1;
         pnlMain.Controls.Add(ConfigTable1);
     }
     else
     {
         pnlMain.Controls.Add((Class.CustomConfigTable)Session["ConfigTable1"]);
     }
 }