private void Control_Init() { ProductMgr myProductMgr = new ProductMgr(); GridView_Manufacturers.DataSource = myProductMgr.Get_Manufacturers(); GridView_Manufacturers.DataBind(); MultiView_Manufacturer.SetActiveView(View_Add); }
protected void lbtn_Edit_Command(object sender, CommandEventArgs e) { if (!DataEval.IsEmptyQuery(e.CommandArgument.ToString())) { Control_FillData(); ProductMgr myProductMgr = new ProductMgr(); Manufacturer myManufacturer = myProductMgr.Get_Manufacturer(e.CommandArgument.ToString()); tbx_EditMF_Name.Text = myManufacturer.Name; tbx_EditMF_Logo.Text = myManufacturer.Logo; tbx_EditMF_URL.Text = myManufacturer.URL; chkbox_EditMF_IsActive.Checked = myManufacturer.IsActive; btn_EditMF_Update.CommandArgument = myManufacturer.ManufacturerID; MultiView_Manufacturer.SetActiveView(View_Edit); } }