public static MS_ACT_RECEIPTS_HEAD GetReceipt(int id) { var db = new SibaModel(); return((from r in db.MS_ACT_RECEIPTS_HEAD where r.ARH_SYS_ID == id select r).ToList() .Select(r => new MS_ACT_RECEIPTS_HEAD { ARH_SYS_ID = r.ARH_SYS_ID, ARH_ACTIVE = r.ARH_ACTIVE, ARH_ATD_CODE = r.ARH_ATD_CODE, ARH_BATCH_NO = r.ARH_BATCH_NO, ARH_CRTE_BY = r.ARH_CRTE_BY, ARH_CRTE_DATE = r.ARH_CRTE_DATE, ARH_DESC = r.ARH_DESC, ARH_RCPT_TYPE = r.ARH_RCPT_TYPE, ARH_MOD_BY = r.ARH_MOD_BY, ARH_MOD_DATE = r.ARH_MOD_DATE, ARH_OFF_CODE = r.ARH_OFF_CODE, ARH_STATUS = r.ARH_STATUS, ARH_TXN_DATE = r.ARH_TXN_DATE, ARH_TRANS_STATUS = r.ARH_TRANS_STATUS, MS_ACCT_TXN_DOC = new MS_ACCT_TXN_DOC { ATD_CODE = r.MS_ACCT_TXN_DOC.ATD_CODE, ATD_NAME = r.MS_ACCT_TXN_DOC.ATD_NAME }, MS_SYS_OFFICE = OfficeMdl.get_office(r.ARH_OFF_CODE), MS_ACCT_RECEIPTS_DTLS = r.MS_ACCT_RECEIPTS_DTLS != null ? r.MS_ACCT_RECEIPTS_DTLS.Select(rd => AccountReceiptDetailsMdl.GetReceiptDtl(rd.ARD_SYS_ID)).ToList():null, }).SingleOrDefault()); }
public static MS_ACCT_PAYMNT_DTLS GetPaymntDtls(int id) { var db = new SibaModel(); return ((from pd in db.MS_ACCT_PAYMNT_DTLS where pd.APD_SYS_ID == id select pd).ToList() .Select(pd => new MS_ACCT_PAYMNT_DTLS { APD_SYS_ID = pd.APD_SYS_ID, APD_ACNT_PERIOD = pd.APD_ACNT_PERIOD, APD_ACTIVE = pd.APD_ACTIVE, APD_APH_SYS_ID = pd.APD_APH_SYS_ID, APD_CRTE_BY = pd.APD_CRTE_BY, APD_CRTE_DATE = pd.APD_CRTE_DATE, APD_CUR_CODE = pd.APD_CUR_CODE, APD_DEP_OFF_CODE = pd.APD_DEP_OFF_CODE, APD_DUE_DATE = pd.APD_DUE_DATE, APD_MOD_BY = pd.APD_MOD_BY, APD_MOD_DATE = pd.APD_MOD_DATE, APD_PM_CODE = pd.APD_PM_CODE, APD_PAYMNT_DESC = pd.APD_PAYMNT_DESC, APD_PAYMNT_TYPE = pd.APD_PAYMNT_TYPE, APD_RCVD_FROM = pd.APD_RCVD_FROM, APD_STATUS = pd.APD_STATUS, APD_TXN_DOC_NO = pd.APD_TXN_DOC_NO, APD_TXN_OFF_CODE = pd.APD_TXN_OFF_CODE, MS_SYS_PAYMNT_MODE = PaymentModeMdl.GetPaymntMode(pd.APD_PM_CODE), MS_SYS_OFFICE = OfficeMdl.get_office(pd.APD_TXN_OFF_CODE), MS_SYS_OFFICE1 = OfficeMdl.get_office(pd.APD_DEP_OFF_CODE), MS_INS_CURRENCY = CurrencyMdl.get_currency(pd.APD_CUR_CODE) }) .Single()); }
public static MS_ACT_PAYMENTS_HEAD GetActPayment(int id) { var db = new SibaModel(); return((from ap in db.MS_ACT_PAYMENTS_HEAD where ap.APH_SYS_ID == id select ap).ToList().Select(p => new MS_ACT_PAYMENTS_HEAD { APH_SYS_ID = p.APH_SYS_ID, APH_ACTIVE = p.APH_ACTIVE, APH_ATD_CODE = p.APH_ATD_CODE, APH_BATCH_NO = p.APH_BATCH_NO, APH_CRTE_BY = p.APH_CRTE_BY, APH_CRTE_DATE = p.APH_CRTE_DATE, APH_DESC = p.APH_DESC, APH_MOD_BY = p.APH_MOD_BY, APH_MOD_DATE = p.APH_MOD_DATE, APH_OFF_CODE = p.APH_OFF_CODE, APH_STATUS = p.APH_STATUS, APH_TXN_DATE = p.APH_TXN_DATE, APH_TRANS_STATUS = p.APH_TRANS_STATUS, MS_ACCT_TXN_DOC = new MS_ACCT_TXN_DOC { ATD_CODE = p.MS_ACCT_TXN_DOC.ATD_CODE, ATD_NAME = p.MS_ACCT_TXN_DOC.ATD_NAME }, MS_SYS_OFFICE = OfficeMdl.get_office(p.APH_OFF_CODE), MS_ACCT_PAYMNT_DTLS = p.MS_ACCT_PAYMNT_DTLS != null?p.MS_ACCT_PAYMNT_DTLS.Select(pd => AccountPaymentDetailMdl.GetPaymntDtls(pd.APD_SYS_ID)).ToList():null, MS_ACCT_PAYMNT_ACNT_DTLS = p.MS_ACCT_PAYMNT_ACNT_DTLS != null? p.MS_ACCT_PAYMNT_ACNT_DTLS.Select(d => AccountPaymentAccountDetailMdl.GetPaymntAcntDtls(d.PAD_SYS_ID)).ToList():null }).Single()); }