public List <Sys_FunctionMaster_fum_Info> SearchRecords(Model.IModel.IModelObject searchCondition) { string sqlString = string.Empty; string whereString = string.Empty; sqlString = "SELECT TOP " + Common.DefineConstantValue.ListRecordMaxCount.ToString() + Environment.NewLine; sqlString += " fum_iRecordID," + Environment.NewLine; sqlString += " fum_cFunctionNumber," + Environment.NewLine; sqlString += " fum_cFunctionDesc," + Environment.NewLine; sqlString += " fum_cRemark," + Environment.NewLine; sqlString += " fum_cAdd," + Environment.NewLine; sqlString += " fum_dAddDate," + Environment.NewLine; sqlString += " fum_cLast," + Environment.NewLine; sqlString += " fum_dLastDate " + Environment.NewLine; sqlString += " FROM Sys_FunctionMaster_fum" + Environment.NewLine; Sys_FunctionMaster_fum_Info info = null; info = searchCondition as Sys_FunctionMaster_fum_Info; if (info != null) { whereString = " WHERE 1=1 "; if (info.fum_cFunctionNumber.Trim() != "") { if (info.fum_cFunctionNumber.ToString().Contains("*") || info.fum_cFunctionNumber.ToString().Contains("?")) { whereString += " AND fum_cFunctionNumber LIKE N'" + LocalDefine.General.ReplaceSQLLikeCondition(info.fum_cFunctionNumber) + "'"; } else { whereString += "AND fum_cFunctionNumber = N'" + info.fum_cFunctionNumber.ToString().Trim() + "'"; } } } sqlString += whereString; IEnumerable <Sys_FunctionMaster_fum_Info> infos = null; List <Sys_FunctionMaster_fum_Info> infoList = null; try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { infos = db.ExecuteQuery <Sys_FunctionMaster_fum_Info>(sqlString, new object[] { }); if (infos != null) { infoList = infos.ToList <Sys_FunctionMaster_fum_Info>(); } } } catch (Exception Ex) { throw Ex; } return(infoList); }
public Model.IModel.IModelObject SaveUserSkin(Model.IModel.IModelObject Entity) { UserSkin_urs_Info info = new UserSkin_urs_Info(); try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { info = Entity as UserSkin_urs_Info; UserSkin_ur query = db.UserSkin_urs.SingleOrDefault(t => t.urs_cUserID == info.urs_cUserID); if (query != null) { query.urs_cSkinName = info.urs_cSkinName; } else { UserSkin_ur newTab = new UserSkin_ur(); newTab.urs_cUserID = info.urs_cUserID; newTab.urs_cSkinName = info.urs_cSkinName; db.UserSkin_urs.InsertOnSubmit(newTab); } db.SubmitChanges(); } } catch (Exception Ex) { throw Ex; } return(info); }
public bool DeleteRecord(Model.IModel.IModelObject KeyObject) { bool isSuccess = false; VegetableSpeciesMaster_vsm_Info keyObject = KeyObject as VegetableSpeciesMaster_vsm_Info; if (keyObject != null) { try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { VegetableSpeciesMaster_vsm vegetableSpeciesMaster = db.VegetableSpeciesMaster_vsm.FirstOrDefault(t => t.vsm_RecordID == keyObject.vsm_RecordID); if (vegetableSpeciesMaster != null) { db.VegetableSpeciesMaster_vsm.DeleteOnSubmit(vegetableSpeciesMaster); db.SubmitChanges(); isSuccess = true; } } } catch (Exception Ex) { throw Ex; } } return(isSuccess); }
public DataRightsRole_drr_Info DisplayRecord(Model.IModel.IModelObject KeyObject) { DataRightsRole_drr_Info info = new DataRightsRole_drr_Info(); info = KeyObject as DataRightsRole_drr_Info; try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { IQueryable <DataRightsRole_drr> taQuery = (from ta in db.DataRightsRole_drrs where ta.drr_iRecordID == info.drr_iRecordID select ta).Take(1); if (taQuery != null) { foreach (DataRightsRole_drr t in taQuery) { info = Common.General.CopyObjectValue <DataRightsRole_drr, DataRightsRole_drr_Info>(t); GetTeacherList(info); GetClassList(info); } } return(info); } } catch (Exception Ex) { throw Ex; } }
public List <DataRightsRole_drr_Info> SearchRecords(Model.IModel.IModelObject searchCondition) { //throw new NotImplementedException(); strSQL = new StringBuilder(); strSQL.AppendLine("SELECT * FROM DataRightsRole_drr"); DataRightsRole_drr_Info info = null; info = searchCondition as DataRightsRole_drr_Info; if (info != null) { strSQL.AppendLine("WHERE 1=1"); if (info.drr_cNumber != string.Empty) { strSQL.AppendLine("AND drr_cNumber='" + info.drr_cNumber + "'"); } if (info.drr_cName != string.Empty) { strSQL.AppendLine("AND drr_cName='" + info.drr_cName + "'"); } } using (VPMSDBDataContext db = new VPMSDBDataContext()) { try { return(db.ExecuteQuery <DataRightsRole_drr_Info>(strSQL.ToString(), new object[] { }).ToList()); } catch { return(null); } } }
public bool DeleteRecord(Model.IModel.IModelObject KeyObject) { Sys_FormMaster_fom_Info info = null; try { info = KeyObject as Sys_FormMaster_fom_Info; using (VPMSDBDataContext db = new VPMSDBDataContext()) { Sys_FormMaster_fom frm = db.Sys_FormMaster_foms.Single <Sys_FormMaster_fom>(i => i.fom_iRecordID == info.fom_iRecordID); for (int i = 0; i < frm.Sys_FormPurview_frps.Count; i++) { Sys_FormPurview_frp sta = frm.Sys_FormPurview_frps[i]; db.Sys_FormPurview_frps.DeleteOnSubmit(sta); } db.Sys_FormMaster_foms.DeleteOnSubmit(frm); db.SubmitChanges(); return(true); } } catch (Exception Ex) { throw Ex; } }
public Model.Management.Master.SiteMaster_stm_Info DisplayRecord(Model.IModel.IModelObject KeyObject) { SiteMaster_stm_Info stm = new SiteMaster_stm_Info(); SiteMaster_stm_Info info = new SiteMaster_stm_Info(); stm = KeyObject as SiteMaster_stm_Info; try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { IQueryable <SiteMaster_stm> taQuery = (from stms in db.SiteMaster_stms where stms.stm_iRecordID == stm.stm_iRecordID //orderby dpms.dpm_iRecordID ascending select stms).Take(1); if (taQuery != null) { //foreach (var t in taQuery) foreach (SiteMaster_stm t in taQuery) { info = Common.General.CopyObjectValue <SiteMaster_stm, SiteMaster_stm_Info>(t); } } return(info); } } catch (Exception Ex) { throw Ex; } }
public Sys_UserMaster_usm_Info FindPermission(Model.IModel.IModelObject KeyObject) { Sys_UserMaster_usm_Info usm = new Sys_UserMaster_usm_Info(); Sys_UserMaster_usm_Info info = new Sys_UserMaster_usm_Info(); usm = KeyObject as Sys_UserMaster_usm_Info; try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { IQueryable <Sys_UserMaster_usm> taQuery = (from ta in db.Sys_UserMaster_usms where ta.usm_cUserLoginID == usm.usm_cUserLoginID && ta.usm_cPasswork == usm.usm_cPasswork //orderby dpms.dpm_iRecordID ascending select ta).Take(1); if (taQuery != null) { foreach (Sys_UserMaster_usm t in taQuery) { info = Common.General.CopyObjectValue <Sys_UserMaster_usm, Sys_UserMaster_usm_Info>(t); FindForm(info); FindFunction(info); } } return(info); } } catch { throw; } }
public Sys_FormMaster_fom_Info DisplayRecord(Model.IModel.IModelObject KeyObject) { Sys_FormMaster_fom_Info frm = new Sys_FormMaster_fom_Info(); Sys_FormMaster_fom_Info info = new Sys_FormMaster_fom_Info(); frm = KeyObject as Sys_FormMaster_fom_Info; try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { IQueryable <Sys_FormMaster_fom> taQuery = (from ta in db.Sys_FormMaster_foms where ta.fom_iRecordID == frm.fom_iRecordID //orderby dpms.dpm_iRecordID ascending select ta).Take(1); if (taQuery != null) { //foreach (var t in taQuery) foreach (Sys_FormMaster_fom t in taQuery) { info = Common.General.CopyObjectValue <Sys_FormMaster_fom, Sys_FormMaster_fom_Info>(t); FindFormPurview(info); } } return(info); } } catch (Exception Ex) { throw Ex; } }
public Model.SysMaster.DepartmentMaster_dpm_Info DisplayRecord(Model.IModel.IModelObject KeyObject) { Model.SysMaster.DepartmentMaster_dpm_Info dpm = new Model.SysMaster.DepartmentMaster_dpm_Info(); Model.SysMaster.DepartmentMaster_dpm_Info info = new Model.SysMaster.DepartmentMaster_dpm_Info(); dpm = KeyObject as Model.SysMaster.DepartmentMaster_dpm_Info; try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { IQueryable <DepartmentMaster_dpm> taQuery = (from dpms in db.DepartmentMaster_dpms where dpms.dpm_iRecordID == dpm.dpm_iRecordID //orderby dpms.dpm_iRecordID ascending select dpms).Take(1); if (taQuery != null) { foreach (var t in taQuery) //foreach (DepartmentMaster_dpm t in taQuery) { info = Common.General.CopyObjectValue <DepartmentMaster_dpm, model.DepartmentMaster_dpm_Info>(t); } } return(info); } } catch (Exception Ex) { throw Ex; } }
public bool DeleteRecord(Model.IModel.IModelObject KeyObject) { bool isSuccess = false; CodeMaster_cmt_Info info = new CodeMaster_cmt_Info(); info = KeyObject as CodeMaster_cmt_Info; try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { CodeMaster_cmt delTab = db.CodeMaster_cmts.SingleOrDefault(t => t.cmt_iRecordID == info.cmt_iRecordID); if (delTab != null) { db.CodeMaster_cmts.DeleteOnSubmit(delTab); db.SubmitChanges(); isSuccess = true; } } } catch (Exception Ex) { throw Ex; } return(isSuccess); }
public SpecialtyMaster_spm_Info DisplayRecord(Model.IModel.IModelObject KeyObject) { SpecialtyMaster_spm_Info spm = new SpecialtyMaster_spm_Info(); SpecialtyMaster_spm_Info info = new SpecialtyMaster_spm_Info(); spm = KeyObject as SpecialtyMaster_spm_Info; try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { IQueryable <SpecialtyMaster_spm> taQuery = (from spms in db.SpecialtyMaster_spms where spms.spm_iRecordID == spm.spm_iRecordID //orderby dpms.dpm_iRecordID ascending select spms).Take(1); if (taQuery != null) { //foreach (var t in taQuery) foreach (SpecialtyMaster_spm t in taQuery) { info = Common.General.CopyObjectValue <SpecialtyMaster_spm, SpecialtyMaster_spm_Info>(t); } } return(info); } } catch (Exception Ex) { throw Ex; } }
public bool DeleteRecord(Model.IModel.IModelObject KeyObject) { SpecialtyMaster_spm_Info info = null; try { info = KeyObject as SpecialtyMaster_spm_Info; using (VPMSDBDataContext db = new VPMSDBDataContext()) { SpecialtyMaster_spm spm = db.SpecialtyMaster_spms.Single <SpecialtyMaster_spm>(i => i.spm_iRecordID == info.spm_iRecordID); for (int i = 0; i < spm.SpecialtyMasterCourse_smcs.Count; i++) { SpecialtyMasterCourse_smc sta = spm.SpecialtyMasterCourse_smcs[i]; db.SpecialtyMasterCourse_smcs.DeleteOnSubmit(sta); } db.SpecialtyMaster_spms.DeleteOnSubmit(spm); db.SubmitChanges(); } return(true); } catch (Exception Ex) { throw Ex; } }
public bool DeleteRecord(Model.IModel.IModelObject KeyObject) { Sys_RoleMaster_rlm_Info info = null; try { info = KeyObject as Sys_RoleMaster_rlm_Info; using (VPMSDBDataContext db = new VPMSDBDataContext()) { Sys_RoleMaster_rlm rlm = db.Sys_RoleMaster_rlms.Single <Sys_RoleMaster_rlm>(i => i.rlm_iRecordID == info.rlm_iRecordID); for (int i = 0; i < rlm.Sys_UserRoles_usrs.Count; i++) { Sys_UserRoles_usr sta = rlm.Sys_UserRoles_usrs[i]; db.Sys_UserRoles_usrs.DeleteOnSubmit(sta); } db.Sys_RoleMaster_rlms.DeleteOnSubmit(rlm); db.SubmitChanges(); return(true); } } catch (Exception Ex) { throw Ex; } }
public Model.General.ReturnValueInfo Save(Model.IModel.IModelObject itemEntity, Common.DefineConstantValue.EditStateEnum EditMode) { bool checkstm; Model.General.ReturnValueInfo msg = new Model.General.ReturnValueInfo(); SiteMaster_stm_Info info = null; info = itemEntity as SiteMaster_stm_Info; if (info == null) { msg.boolValue = false; msg.messageText = "传入的数据为空!"; return(msg); } try { switch (EditMode) { case Common.DefineConstantValue.EditStateEnum.OE_Delete: checkstm = this._isteMasterDA.DeleteRecord(info); if (checkstm == true) { msg.messageText = Common.DefineConstantValue.SystemMessageText.strMessageText_I_RecordByDelete; } break; case Common.DefineConstantValue.EditStateEnum.OE_Insert: checkstm = this._isteMasterDA.IsExistRecord(info); if (checkstm == false) { this._isteMasterDA.InsertRecord(info); } else { msg.messageText = Common.DefineConstantValue.SystemMessageText.strMessageText_I_AddFail + " 地点编号重复!"; } break; case Common.DefineConstantValue.EditStateEnum.OE_Update: checkstm = this._isteMasterDA.UpdateRecord(info); //if (checkstm == true) //{ // msg.messageText = Common.DefineConstantValue.SystemMessageText.strMessageText_I_UpdateSuccess; //} //else //{ // msg.messageText = Common.DefineConstantValue.SystemMessageText.strMessageText_I_UpdateFail; //} break; } } catch (Exception Ex) { throw Ex; } return(msg); }
public List <CodeMaster_cmt_Info> SearchRecords(Model.IModel.IModelObject searchCondition) { List <CodeMaster_cmt_Info> list = new List <CodeMaster_cmt_Info>(); CodeMaster_cmt_Info info = new CodeMaster_cmt_Info(); info = searchCondition as CodeMaster_cmt_Info; string sqlString = string.Empty; string whereString = string.Empty; sqlString = "SELECT TOP " + Common.DefineConstantValue.ListRecordMaxCount.ToString() + Environment.NewLine; sqlString += "*" + Environment.NewLine; sqlString += "FROM dbo.CodeMaster_cmt" + Environment.NewLine; whereString = "WHERE 1=1" + Environment.NewLine; if (info.cmt_cKey1 != "") { whereString += "AND cmt_cKey1='" + info.cmt_cKey1 + "' " + Environment.NewLine; } if (info.cmt_cKey2 != "") { whereString += "AND cmt_cKey2='" + info.cmt_cKey2 + "' " + Environment.NewLine; } if (info.cmt_cValue != "") { if (info.cmt_cValue.ToString().Contains("*") || info.cmt_cValue.ToString().Contains("?")) { whereString += "AND cmt_cValue LIKE N'" + info.cmt_cValue.ToString().Replace("*", "%").Replace("?", "_") + "' " + Environment.NewLine; } else { whereString += "AND cmt_cValue LIKE N'%" + info.cmt_cValue + "%' " + Environment.NewLine; } } if (info.cmt_fNumber != 0) { whereString += "AND cmt_fNumber=Convert(decimal," + info.cmt_fNumber.ToString() + ")" + Environment.NewLine; } IEnumerable <CodeMaster_cmt_Info> infos = null; try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { infos = db.ExecuteQuery <CodeMaster_cmt_Info>(sqlString + whereString, new object[] { }); if (infos != null) { list = infos.ToList <CodeMaster_cmt_Info>(); } } } catch (Exception Ex) { throw Ex; } return(list); }
public List <Model.Management.Master.SchoolMaster_scm_Info> SearchRecords(Model.IModel.IModelObject MDobject) { SchoolMaster_scm_Info info = null; IQueryable <SchoolMaster_scm> taQuery = null; info = Common.General.CopyObjectValue <Model.IModel.IModelObject, SchoolMaster_scm_Info>(MDobject); List <Model.Management.Master.SchoolMaster_scm_Info> list = new List <SchoolMaster_scm_Info>(); try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { taQuery = db.SchoolMaster_scm.Take(Common.DefineConstantValue.ListRecordMaxCount); if (info.scm_cName.ToString() != "") { if (info.scm_cName.ToString().IndexOf("*") != -1 || info.scm_cName.ToString().IndexOf("?") != -1) { taQuery = from t in taQuery where SqlMethods.Like(t.scm_cName, info.scm_cName.ToString().Replace("*", "%").Replace("?", "_")) select t; } else { taQuery = taQuery.Where(t => t.scm_cName.Contains(info.scm_cName)); } } if (info.scm_cNumber.ToString() != "") { if (info.scm_cNumber.ToString().IndexOf("*") != -1 || info.scm_cNumber.ToString().IndexOf("?") != -1) { taQuery = from t in taQuery where SqlMethods.Like(t.scm_cNumber, info.scm_cNumber.ToString().Replace("*", "%").Replace("?", "_")) select t; } else { taQuery = taQuery.Where(t => t.scm_cNumber.Contains(info.scm_cNumber)); } } if (taQuery != null) { foreach (SchoolMaster_scm t in taQuery.ToList()) { info = Common.General.CopyObjectValue <SchoolMaster_scm, SchoolMaster_scm_Info>(t); list.Add(info); } } } } catch (Exception Ex) { throw Ex; } return(list); }
public Model.IModel.IModelObject SaveUserSkin(Model.IModel.IModelObject Entity) { try { return(_userSkinDA.SaveUserSkin(Entity)); } catch (Exception Ex) { throw Ex; } }
public List <Sys_UserPurview_usp_Info> SearchRecords(Model.IModel.IModelObject searchCondition) { Sys_UserPurview_usp_Info usp = new Sys_UserPurview_usp_Info(); List <Sys_UserPurview_usp_Info> uspInfo = new List <Sys_UserPurview_usp_Info>(); usp = searchCondition as Sys_UserPurview_usp_Info; FindFunctionByUR(usp); uspInfo.Add(usp); return(uspInfo); }
public List <Model.IModel.IModelObject> SearchRecords(Model.IModel.IModelObject itemEntity) { List <Model.Management.Master.BuildingMaster_bdm_Info> list = _buildingMasterDA.SearchRecords(itemEntity); List <Model.IModel.IModelObject> objectList = new List <Model.IModel.IModelObject>(); foreach (BuildingMaster_bdm_Info item in list) { objectList.Add(item); } return(objectList); }
public List <Model.IModel.IModelObject> SearchRecords(Model.IModel.IModelObject itemEntity) { List <Model.Management.Master.CardUserMaster_cus_Info> list = _cardUserMasterDA.SearchRecords(itemEntity); List <Model.IModel.IModelObject> objectList = new List <Model.IModel.IModelObject>(); foreach (CardUserMaster_cus_Info item in list) { objectList.Add(item); } return(objectList); }
public Sys_UserPurview_usp_Info DisplayRecord(Model.IModel.IModelObject KeyObject) { Sys_UserPurview_usp_Info usp = new Sys_UserPurview_usp_Info(); usp = KeyObject as Sys_UserPurview_usp_Info; FindUser(usp); FindRole(usp); FindFunction(usp); return(usp); }
public Model.IModel.IModelObject DisplayRecord(Model.IModel.IModelObject itemEntity) { try { return(_codeMasterDA.DisplayRecord(itemEntity)); } catch (Exception Ex) { throw Ex; } }
public bool DeleteRecord(Model.IModel.IModelObject KeyObject) { DataRightsRole_drr_Info info = null; info = KeyObject as DataRightsRole_drr_Info; using (VPMSDBDataContext db = new VPMSDBDataContext()) { try { db.Connection.Open(); db.Transaction = db.Connection.BeginTransaction(); DataRightsRole_drr drr = db.DataRightsRole_drrs.Single <DataRightsRole_drr>(i => i.drr_iRecordID == info.drr_iRecordID); IEnumerable <DataRightsRole_TeacherList_dtl> _teacher = from t in db.DataRightsRole_TeacherList_dtls where t.dtl_cRoleNumber == drr.drr_cNumber select t; db.DataRightsRole_TeacherList_dtls.DeleteAllOnSubmit(_teacher); db.SubmitChanges(); IEnumerable <DataRightsRole_ClassList_dtc> _class = from t in db.DataRightsRole_ClassList_dtcs where t.dtc_cRoleNumber == drr.drr_cNumber select t; db.DataRightsRole_ClassList_dtcs.DeleteAllOnSubmit(_class); db.SubmitChanges(); IEnumerable <DataRightsRoleUser_dru> _roleUser = from t in db.DataRightsRoleUser_drus where t.dru_cRoleNumber == drr.drr_cNumber select t; db.DataRightsRoleUser_drus.DeleteAllOnSubmit(_roleUser); db.SubmitChanges(); //for (int i = 0; i < drr.DataRightsRole_TeacherList_dtls.Count; i++) //{ // DataRightsRole_TeacherList_dtl sta = drr.DataRightsRole_TeacherList_dtls[i]; // db.DataRightsRole_TeacherList_dtls.DeleteOnSubmit(sta); //} //for (int i = 0; i < drr.DataRightsRole_ClassList_dtcs.Count; i++) //{ // DataRightsRole_ClassList_dtc sta = drr.DataRightsRole_ClassList_dtcs[i]; // db.DataRightsRole_ClassList_dtcs.DeleteOnSubmit(sta); //} db.DataRightsRole_drrs.DeleteOnSubmit(drr); db.SubmitChanges(); db.Transaction.Commit(); return(true); } catch (Exception Ex) { db.Transaction.Rollback(); return(false); } } }
public Model.IModel.IModelObject GetTableFieldLenght() { Model.IModel.IModelObject info = null; try { info = _sysFormMasterDA.GetTableFieldLenght(); } catch (Exception Ex) { throw Ex; } return(info); }
public Model.General.ReturnValueInfo Save(Model.IModel.IModelObject itemEntity, Common.DefineConstantValue.EditStateEnum EditMode) { bool _check; Model.General.ReturnValueInfo msg = new Model.General.ReturnValueInfo(); DataRightsRole_drr_Info info = null; info = itemEntity as DataRightsRole_drr_Info; if (info == null) { msg.boolValue = false; msg.messageText = "传入的数据为空!"; return(msg); } try { switch (EditMode) { case Common.DefineConstantValue.EditStateEnum.OE_Delete: _check = this._dataRightsRoleDA.DeleteRecord(info); if (_check) { msg.messageText = Common.DefineConstantValue.SystemMessageText.strMessageText_I_RecordByDelete; } break; case Common.DefineConstantValue.EditStateEnum.OE_Insert: _check = this._dataRightsRoleDA.IsExistRecord(info); if (!_check) { msg.boolValue = this._dataRightsRoleDA.InsertRecord(info); } else { msg.messageText = Common.DefineConstantValue.SystemMessageText.strMessageText_I_AddFail + " 表单编号重复!"; } break; case Common.DefineConstantValue.EditStateEnum.OE_Update: msg.boolValue = this._dataRightsRoleDA.UpdateRecord(info); break; } } catch (Exception Ex) { throw Ex; } return(msg); }
public Model.IModel.IModelObject GetTableFieldLenght() { Model.IModel.IModelObject info = null; try { info = _userPurviewDA.GetTableFieldLenght(); } catch (Exception Ex) { throw Ex; } return(info); }
public Model.IModel.IModelObject DisplayRecord(Model.IModel.IModelObject itemEntity) { try { Model.IModel.IModelObject info = null; info = _cardUserMasterDA.DisplayRecord(itemEntity); if (info != null) { GetPhoto(info as CardUserMaster_cus_Info); } return(info); } catch (Exception Ex) { throw Ex; } }
public Model.General.ReturnValueInfo Save(Model.IModel.IModelObject itemEntity, Common.DefineConstantValue.EditStateEnum EditMode) { //throw new NotImplementedException(); bool b; Model.General.ReturnValueInfo msg = new Model.General.ReturnValueInfo(); Sys_UserPurview_usp_Info info = null; info = itemEntity as Sys_UserPurview_usp_Info; if (info == null) { msg.boolValue = false; msg.messageText = "传入的数据为空!"; return(msg); } try { switch (EditMode) { case Common.DefineConstantValue.EditStateEnum.OE_Delete: b = this._userPurviewDA.DeleteRecord(info); if (b == true) { msg.messageText = Common.DefineConstantValue.SystemMessageText.strMessageText_I_RecordByDelete; } break; case Common.DefineConstantValue.EditStateEnum.OE_Insert: this._userPurviewDA.InsertRecord(info); break; case Common.DefineConstantValue.EditStateEnum.OE_Update: b = this._userPurviewDA.UpdateRecord(info); break; } } catch (Exception Ex) { throw Ex; } return(msg); }
public Model.IModel.IModelObject DisplayRecord(Model.IModel.IModelObject itemEntity) { if (itemEntity == null) { return(null); } else { try { return(this._dataRightsRoleDA.DisplayRecord(itemEntity)); } catch (Exception Ex) { throw Ex; } } }