diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/PaymentMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/PaymentMaintain_QryService.cs new file mode 100644 index 0000000..976f1c6 --- /dev/null +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/PaymentMaintain_QryService.cs @@ -0,0 +1,54 @@ +using EasyBL.WebApi.Message; +using EasyBL.WEBAPP.WSM; +using Entity.Sugar; +using Entity.ViewModels; +using SqlSugar; +using SqlSugar.Base; +using System; +using System.Collections.Generic; + +namespace EasyBL.WEBAPP.SYS +{ + public class PaymentMaintain_QryService : ServiceBase + { + + public Dictionary FindAllByIDsAsDictionary(string sPaymentID, string sBookingID) { + + Dictionary rsResultDic = new Dictionary(); + + string sMsg = null; + var db = SugarBase.GetIntance(); + + try + { + do + { + + var rsPaymentList = db.Queryable() + .Where(t1 => t1.Effective == "Y") + .Where(t1 => t1.DelStatus == "N") + .WhereIF(!string.IsNullOrEmpty(sPaymentID), t1 => t1.PaymentID == sPaymentID) + .WhereIF(!string.IsNullOrEmpty(sBookingID), t1 => t1.BookingID == sBookingID) + .ToList(); + + foreach (var Payment in rsPaymentList) + { + rsResultDic[Payment.PaymentID] = Payment; + } + + return rsResultDic; + + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + } + + + return rsResultDic; + } + + + } +} \ No newline at end of file diff --git a/EuroTran/Entity/Sugar/SETB_SAL_Payment.cs b/EuroTran/Entity/Sugar/SETB_SAL_Payment.cs new file mode 100644 index 0000000..642760c --- /dev/null +++ b/EuroTran/Entity/Sugar/SETB_SAL_Payment.cs @@ -0,0 +1,180 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace Entity.Sugar +{ + /// + /// + /// + [SugarTable("SETB_SAL_Payment")] + public partial class SETB_SAL_Payment : ModelContext + { + public SETB_SAL_Payment() + { + + + } + /// + /// Desc: + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey = true)] + public string PaymentID { get; set; } + public const string CN_PAYMENTID = "PaymentID"; + /// + /// Desc: + /// Default: + /// Nullable:False + /// + public string BookingID { get; set; } + public const string CN_BOOKINGID = "BookingID"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public string PaymentNo { get; set; } + public const string CN_PAYMENTNO = "PaymentNo"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public string PaymentType { get; set; } + public const string CN_PAYMENTTYPE = "PaymentType"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public DateTime? DueDate { get; set; } + public const string CN_DUEDATE = "DueDate"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public DateTime? PaymentDate { get; set; } + public const string CN_PAYMENTDATE = "PaymentDate"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public string CurrencyID { get; set; } + public const string CN_CURRENCYID = "CurrencyID"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public string TaxID { get; set; } + public const string CN_TAXID = "TaxID"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public float Amount { get; set; } + public const string CN_AMOUNT = "Amount"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public string PaymentStatus { get; set; } + public const string CN_PAYMENTSTATUS = "PaymentStatus"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public string InvoiceID { get; set; } + public const string CN_INVOICEID = "InvoiceID"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public string Memo { get; set; } + public const string CN_MEMO = "Memo"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public string Effective { get; set; } + public const string CN_EFFECTIVE = "Effective"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public int? OrderByValue { get; set; } + public const string CN_ORDERBYVALUE = "OrderByValue"; + + /// + /// Desc: + /// Default:N + /// Nullable:True + /// + public string DelStatus { get; set; } + public const string CN_DELSTATUS = "DelStatus"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public string CreateUser { get; set; } + public const string CN_CREATEUSER = "CreateUser"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public DateTime? CreateDate { get; set; } + public const string CN_CREATEDATE = "CreateDate"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public string ModifyUser { get; set; } + public const string CN_MODIFYUSER = "ModifyUser"; + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + public DateTime? ModifyDate { get; set; } + public const string CN_MODIFYDATE = "ModifyDate"; + + /// + /// Desc: + /// Default: + /// Nullable:False + /// + public string OrgID { get; set; } + public const string CN_ORGID = "OrgID"; + + } +} \ No newline at end of file