private FormRightCollection GetControls(string processID) { string moduleName = Constants.ModuleName; string componentName = Constants.ComponentName; FormRightController formRigthCtrl = new FormRightController(moduleName, componentName, DataProvider.GetConnectionString()); List<FormRightInfo> lstFormRightInfo = formRigthCtrl.GetFormRightSetting(processID); FormRightCollection col = new FormRightCollection(); for (int i = 0; i < lstFormRightInfo.Count; i++) { col.Add(lstFormRightInfo[i]); } return col; }
protected void SetFormValidation(string processID) { string moduleName = Constants.ModuleName; string componentName = Constants.ComponentName; FormRightController _formRigthCtrl = new FormRightController(moduleName, componentName, DataProvider.GetConnectionString()); List<FormRightInfo> lstFormRightInfo = _formRigthCtrl.GetFormRightSetting(processID); for (int i = 0; i < lstFormRightInfo.Count; i++) { FormRightInfo formRightInfo = lstFormRightInfo[i]; formRightInfo.ErrorMessage = Localization.GetString(formRightInfo.ErrorMessageResourceID, LocalResourceFile); } string js = _formRigthCtrl.MakeFormValidationScript(lstFormRightInfo); ScriptManager.RegisterClientScriptBlock(this.Page, Type.GetType("System.String"), moduleName + "_" + componentName + "_FormValidation", js, true); }