コード例 #1
0
        public static MS_ACCT_PAYMNT_ACNT_DTLS GetPaymntAcntDtls(int id)
        {
            var db = new SibaModel();

            return
                ((from ad in db.MS_ACCT_PAYMNT_ACNT_DTLS where ad.PAD_SYS_ID == id select ad).ToList()
                 .Select(ad => new MS_ACCT_PAYMNT_ACNT_DTLS
            {
                PAD_SYS_ID = ad.PAD_SYS_ID,
                PAD_ACCT_CODE = ad.PAD_ACCT_CODE,
                PAD_ACTIVE = ad.PAD_ACTIVE,
                PAD_AMNT_BC = ad.PAD_AMNT_BC,
                PAD_AMNT_FC = ad.PAD_AMNT_FC,
                PAD_APH_SYS_ID = ad.PAD_APH_SYS_ID,
                PAD_CRTE_BY = ad.PAD_CRTE_BY,
                PAD_CRTE_DATE = ad.PAD_CRTE_DATE,
                PAD_DESC = ad.PAD_DESC,
                PAD_DR_CR = ad.PAD_DR_CR,
                PAD_MOD_BY = ad.PAD_MOD_BY,
                PAD_MOD_DATE = ad.PAD_MOD_DATE,
                PAD_STATUS = ad.PAD_STATUS,
                PAD_SUB_ACCT_CODE = ad.PAD_SUB_ACCT_CODE,
                MS_ACCT_SUB_ACCOUNT = SubAccountMdl.GetSubAccount(ad.PAD_SUB_ACCT_CODE),
                MS_ACCT_MAIN_ACCOUNT = MainAccountMdl.GetMainAccount(ad.PAD_ACCT_CODE)
            }).Single());
        }
コード例 #2
0
        public static MS_ACCT_SERVICE_TAX GetServiceTax(string code)
        {
            var _db = new SibaModel();

            using (_db)
            {
                return
                    ((from st in _db.MS_ACCT_SERVICE_TAX where st.TX_TAX_CODE == code select st).ToList()
                     .Select(s => new MS_ACCT_SERVICE_TAX
                {
                    TX_TAX_CODE = s.TX_TAX_CODE,
                    TX_SUB_ACCT_CODE = s.TX_SUB_ACCT_CODE,
                    TX_MAIN_ACCT_CODE = s.TX_MAIN_ACCT_CODE,
                    TX_CRTE_BY = s.TX_CRTE_BY,
                    TX_CRTE_DATE = s.TX_CRTE_DATE,
                    TX_CUST_CAT_CODE = s.TX_CUST_CAT_CODE,
                    TX_FROM_DATE = s.TX_FROM_DATE,
                    TX_MIN_TAX_APP = s.TX_MIN_TAX_APP,
                    TX_MOD_BY = s.TX_MOD_BY,
                    TX_MOD_DATE = s.TX_MOD_DATE,
                    TX_STATUS = s.TX_STATUS,
                    TX_SYS_ID = s.TX_SYS_ID,
                    TX_TAX_NAME = s.TX_TAX_NAME,
                    TX_TAX_PERC = s.TX_TAX_PERC,
                    TX_TO_DATE = s.TX_TO_DATE,
                    MS_ACCT_MAIN_ACCOUNT = MainAccountMdl.GetMainAccount(s.TX_MAIN_ACCT_CODE),
                    MS_ACCT_SUB_ACCOUNT = SubAccountMdl.GetSubAccount(s.TX_SUB_ACCT_CODE),
                    MS_CUSTOMER_CATEGORY = CustomerCategoryMdl.get_custcat(s.TX_CUST_CAT_CODE)
                }).SingleOrDefault());
            }
        }
コード例 #3
0
 //api/MainAccount/5
 public object Get(string id)
 {
     try
     {
         return(MainAccountMdl.GetMainAccount(id));
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
コード例 #4
0
        public object CheckCode(string code)
        {
            try
            {
                var result = MainAccountMdl.GetMainAccount(code);

                return(result != null ? (object)new { state = true, name = result.ACCT_NAME } : new { state = false });
            }
            catch (Exception e)
            {
                return(new { state = false, message = "Server Error", exception = e });
            }
        }