public BaseForm getForm(typeForm type, string cnnString, string tableName, BaseForm rootForm) { BaseForm res = null; switch (type) { case typeForm.ADD: res = new AddForm(cnnString, tableName); return(res); case typeForm.READ: res = new ReadForm(cnnString, tableName); return(res); case typeForm.UPDATE: res = new UpdateForm(cnnString, tableName); return(res); case typeForm.DELETE: res = new DeleteForm(cnnString, tableName); return(res); case typeForm.HASFORMS: res = new FormHasForms(cnnString, tableName, rootForm); return(res); default: return(res); } }
public BaseForm getForm(typeForm type, AbstractController controller, string tableName) { BaseForm res = null; switch (type) { case typeForm.ADD: res = new AddForm(controller, tableName); return(res); case typeForm.READ: res = new ReadForm(controller, tableName); return(res); case typeForm.UPDATE: res = new UpdateForm(controller, tableName); return(res); case typeForm.DELETE: res = new DeleteForm(controller, tableName); return(res); default: return(res); } }