public List <Model.Management.Master.BuildingMaster_bdm_Info> SearchRecords(Model.IModel.IModelObject MDobject) { BuildingMaster_bdm_Info info = null; IQueryable <BuildingMaster_bdm> taQuery = null; info = Common.General.CopyObjectValue <Model.IModel.IModelObject, BuildingMaster_bdm_Info>(MDobject); List <Model.Management.Master.BuildingMaster_bdm_Info> list = new List <BuildingMaster_bdm_Info>(); try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { taQuery = db.BuildingMaster_bdms.Take(Common.DefineConstantValue.ListRecordMaxCount); if (info.bdm_cName.ToString() != "") { if (info.bdm_cName.ToString().IndexOf("*") != -1 || info.bdm_cName.ToString().IndexOf("?") != -1) { taQuery = from t in taQuery where SqlMethods.Like(t.bdm_cName, info.bdm_cName.ToString().Replace("*", "%").Replace("?", "_")) select t; } else { taQuery = taQuery.Where(t => t.bdm_cName.Contains(info.bdm_cName)); } } if (info.bdm_cNumber.ToString() != "") { if (info.bdm_cNumber.ToString().IndexOf("*") != -1 || info.bdm_cNumber.ToString().IndexOf("?") != -1) { taQuery = from t in taQuery where SqlMethods.Like(t.bdm_cNumber, info.bdm_cNumber.ToString().Replace("*", "%").Replace("?", "_")) select t; } else { taQuery = taQuery.Where(t => t.bdm_cNumber.Contains(info.bdm_cNumber)); } } if (taQuery != null) { foreach (BuildingMaster_bdm t in taQuery.ToList()) { info = Common.General.CopyObjectValue <BuildingMaster_bdm, BuildingMaster_bdm_Info>(t); list.Add(info); } } } } catch (Exception Ex) { throw Ex; } return(list); }
public BuildingMaster_bdm_Info GetRecord_Next(Model.Base.DataBaseCommandInfo commandInfo) { BuildingMaster_bdm_Info info = null; try { info = this._buildingMasterDA.GetRecord_Next(commandInfo); } catch (Exception Ex) { throw Ex; } return(info); }
public BuildingMaster_bdm_Info GetRecord_Last() { BuildingMaster_bdm_Info info = null; try { info = this._buildingMasterDA.GetRecord_Last(); } catch (Exception Ex) { throw Ex; } return(info); }
public Model.IModel.IModelObject GetTableFieldLenght() { LocalGeneral general = new LocalGeneral(); BuildingMaster_bdm_Info info = null; try { info = general.GetTableFieldLenght <BuildingMaster_bdm_Info>("BuildingMaster_bdm"); } catch (Exception Ex) { throw Ex; } return(info); }