public Sys_SupplierMaster_slm_Info GetRecord_Previous(DataBaseCommandInfo commandInfo) { Sys_SupplierMaster_slm_Info supplierMasterInfo = null; if (commandInfo != null && commandInfo.KeyInfoList != null && commandInfo.KeyInfoList[0] != null && commandInfo.KeyInfoList[0].KeyValue != "") { try { using (VPMSDBDataContext db = new VPMSDBDataContext()) { SupplierMaster_slm supplierMaster = (from t in db.SupplierMaster_slm where t.slm_iRecordID < Convert.ToInt32(commandInfo.KeyInfoList[0].KeyValue) orderby t.slm_iRecordID descending select t).FirstOrDefault(); if (supplierMaster != null) { supplierMasterInfo = Common.General.CopyObjectValue <SupplierMaster_slm, Sys_SupplierMaster_slm_Info>(supplierMaster); } } } catch (Exception Ex) { throw Ex; } } return(supplierMasterInfo); }
public Sys_SupplierMaster_slm_Info GetRecord_Next(DataBaseCommandInfo commandInfo) { try { return(_supplierMasterDA.GetRecord_Next(commandInfo)); } catch (Exception Ex) { throw Ex; } }
public Sys_SupplierMaster_slm_Info GetRecord_Next(DataBaseCommandInfo commandInfo) { try { return _supplierMasterDA.GetRecord_Next(commandInfo); } catch (Exception Ex) { throw Ex; } }
public QualityProblemMaster_qpm_Info GetRecord_Next(DataBaseCommandInfo commandInfo) { try { return this._IQualityProblemMasterDA.GetRecord_Next(commandInfo); } catch (Exception ex) { throw ex; } }
//public StopReasonMaster_srm_Info SearchRecord_Sqlite(int iRecordID) //{ // throw new NotImplementedException(); //} public bool AdjustSequency(int recordID, int level) { try { //Add by ximonliang 2015-05-21 StopReasonDA DAL = new StopReasonDA(); var selectItem = _IStopReasonDA.DisplayRecord(recordID) as StopReasonMaster_srm_Info; if (level > 0) { DataBaseCommandInfo commandInfo = new DataBaseCommandInfo(); commandInfo.KeyInfoList.Add(new DataBaseCommandKeyInfo() { KeyValue = recordID.ToString() }); //Add by ximonliang 2015-05-21 //var prevItem = _IStopReasonDA.GetRecord_Previous(commandInfo); var prevItem = DAL.GetTypeRecord_Previous(commandInfo); selectItem.srm_iSeq = prevItem.srm_iSeq; _IStopReasonDA.UpdateRecord(selectItem); prevItem.srm_iSeq = selectItem.srm_iSeq + 1; _IStopReasonDA.UpdateRecord(prevItem); return true; } else if (level < 0) { DataBaseCommandInfo commandInfo = new DataBaseCommandInfo(); commandInfo.KeyInfoList.Add(new DataBaseCommandKeyInfo() { KeyValue = recordID.ToString() }); //Add by ximonliang 2015-05-21 //var nextItem = _IStopReasonDA.GetRecord_Next(commandInfo); var nextItem = DAL.GetTypeRecord_Next(commandInfo); selectItem.srm_iSeq = nextItem.srm_iSeq; _IStopReasonDA.UpdateRecord(selectItem); nextItem.srm_iSeq = selectItem.srm_iSeq - 1; _IStopReasonDA.UpdateRecord(nextItem); return true; } return false; } catch { return false; } }
public ReturnValueInfo AdjustSequency(Guid recordID, int level) { ReturnValueInfo returnValue = new ReturnValueInfo(); try { var selectItem = _prepareProjectMasterDA.DisplayRecord(new PrepareProjectMaster_ppm_Info() { ppm_RecordID = recordID }) as PrepareProjectMaster_ppm_Info; if (level > 0) { DataBaseCommandInfo commandInfo = new DataBaseCommandInfo(); commandInfo.KeyInfoList.Add(new DataBaseCommandKeyInfo() { KeyValue = recordID.ToString() }); var prevItem = _prepareProjectMasterDA.GetRecord_Previous(commandInfo); selectItem.ppm_iSeq = prevItem.ppm_iSeq; _prepareProjectMasterDA.UpdateRecord(selectItem); prevItem.ppm_iSeq = selectItem.ppm_iSeq + 1; _prepareProjectMasterDA.UpdateRecord(prevItem); returnValue.boolValue = true; } else if (level < 0) { DataBaseCommandInfo commandInfo = new DataBaseCommandInfo(); commandInfo.KeyInfoList.Add(new DataBaseCommandKeyInfo() { KeyValue = recordID.ToString() }); var nextItem = _prepareProjectMasterDA.GetRecord_Next(commandInfo); selectItem.ppm_iSeq = nextItem.ppm_iSeq; _prepareProjectMasterDA.UpdateRecord(selectItem); nextItem.ppm_iSeq = selectItem.ppm_iSeq - 1; _prepareProjectMasterDA.UpdateRecord(nextItem); returnValue.boolValue = true; } } catch (Exception ex) { returnValue.isError = true; returnValue.boolValue = false; returnValue.ValueObject = ex; returnValue.messageText = ex.Message; } return returnValue; }
public QualityProblemMaster_qpm_Info GetRecord_Next(DataBaseCommandInfo commandInfo) { QualityProblemMaster_qpm_Info info; try { using (MainDBDataContext db = new MainDBDataContext()) { QualityProblemMaster_qpm query = db.QualityProblemMaster_qpm .Where(t => t.qpm_iRecordID < Convert.ToInt32(commandInfo.KeyInfoList[0].KeyValue)) .OrderBy(t => t.qpm_iRecordID) .FirstOrDefault(); info = Common.General.CopyObjectValue<QualityProblemMaster_qpm, QualityProblemMaster_qpm_Info>(query); } } catch (Exception ex) { throw ex; } return info; }
public SignalLightsStatus_sls_Info GetRecord_Previous(DataBaseCommandInfo commandInfo) { throw new NotImplementedException(); }
public ProjectStopRecord_psrd_Info GetRecord_Previous(DataBaseCommandInfo commandInfo) { throw new NotImplementedException(); }
public MaintainPlan_mtp_Info GetRecord_Previous(DataBaseCommandInfo commandInfo) { return null; }
public NoticeManage_Info GetRecord_Previous(DataBaseCommandInfo commandInfo) { return null; }
public ProjectStopReason_pjsr_Info GetRecord_Next(DataBaseCommandInfo commandInfo) { throw new NotImplementedException(); }