private void BindDataInGridView() { /*1. GetConfigApproveMember*/ var biz = new BLL.DataCenterBiz(); var res = biz.GetConfigApproveMember(); if (res.IsError) { UCModalError.ShowMessageError = res.ErrorMsg; UCModalError.ShowModalError(); } else { gvApproveRegis.DataSource = res.DataResponse; gvApproveRegis.DataBind(); } /*1. GetConfigApproveMember*/ /*3. GetConfigGeneral*/ var res3 = biz.GetConfigGeneral(); if (res3.IsError) { UCModalError.ShowMessageError = res3.ErrorMsg; UCModalError.ShowModalError(); } else { gvGeneral.DataSource = res3.DataResponse; gvGeneral.DataBind(); } /*3. GetConfigGeneral*/ /*2. GetConfigApproveDocument*/ var res2 = biz.GetConfigApproveDocument(); if (res2.IsError) { UCModalError.ShowMessageError = res2.ErrorMsg; UCModalError.ShowModalError(); } else { gvInspectorDoc.DataSource = res2.DataResponse; gvInspectorDoc.DataBind(); } /*2. GetConfigApproveDocument*/ //Config อนุมัติสมัครสมาชิก เพิ่มเติม this.GetNewRegistrationApprove(); // Config Check Exam License var res4 = biz.GetConfigCheckExamLicense(); if (res4.IsError) { UCModalError.ShowMessageError = res4.ErrorMsg; UCModalError.ShowModalError(); } else { gvCfgCheckExamLicense.DataSource = res4.DataResponse; gvCfgCheckExamLicense.DataBind(); } UpdatePanelGrid.Update(); }
/// <summary> /// GridViewDataBindSingleMode /// </summary> /// <param name="LayerMode">String</param> /// <LASTUPDATE>08/08/2557</LASTUPDATE> /// <AUTHOR>Natta</AUTHOR> private void GridViewDataBindSingleMode(string LayerMode) { BLL.DataCenterBiz biz = new BLL.DataCenterBiz(); if (LayerMode.Equals("1")) { /*1. GetConfigApproveMember*/ var res = biz.GetConfigApproveMember(); if (res.IsError) { UCModalError.ShowMessageError = res.ErrorMsg; UCModalError.ShowModalError(); } else { gvApproveRegis.DataSource = res.DataResponse; gvApproveRegis.DataBind(); } /*1. GetConfigApproveMember*/ } else if (LayerMode.Equals("2")) { //Config อนุมัติสมัครสมาชิก เพิ่มเติม this.GetNewRegistrationApprove(); } else if (LayerMode.Equals("3")) { /*2. GetConfigApproveDocument*/ var res2 = biz.GetConfigApproveDocument(); if (res2.IsError) { UCModalError.ShowMessageError = res2.ErrorMsg; UCModalError.ShowModalError(); } else { gvInspectorDoc.DataSource = res2.DataResponse; gvInspectorDoc.DataBind(); } /*2. GetConfigApproveDocument*/ } else if (LayerMode.Equals("4")) { /*3. GetConfigGeneral*/ var res3 = biz.GetConfigGeneral(); if (res3.IsError) { UCModalError.ShowMessageError = res3.ErrorMsg; UCModalError.ShowModalError(); } else { gvGeneral.DataSource = res3.DataResponse; gvGeneral.DataBind(); } /*3. GetConfigGeneral*/ } else if (LayerMode.Equals("5")) { // Config Check Exam License var res4 = biz.GetConfigCheckExamLicense(); if (res4.IsError) { UCModalError.ShowMessageError = res4.ErrorMsg; UCModalError.ShowModalError(); } else { gvCfgCheckExamLicense.DataSource = res4.DataResponse; gvCfgCheckExamLicense.DataBind(); } } UpdatePanelGrid.Update(); }