219 lines
5.5 KiB
C#
219 lines
5.5 KiB
C#
|
|
|||
|
using Ease.Core.Model;
|
|||
|
|
|||
|
|
|||
|
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
using System.IO;
|
|||
|
using System.Reflection;
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
#region VendorBill
|
|||
|
public class VendorBill : BasicBaseObject
|
|||
|
{
|
|||
|
#region Constructor
|
|||
|
public VendorBill()
|
|||
|
{
|
|||
|
_nVendorID = 0;
|
|||
|
_bIsFullPaid = false ;
|
|||
|
_bIsAdvance = false;
|
|||
|
_sRemarks = string.Empty;
|
|||
|
_dAmount = 0.0;
|
|||
|
_dEffectDate = DateTime.MinValue;
|
|||
|
_sChalanNumber = string.Empty;
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region VendorID
|
|||
|
private int _nVendorID;
|
|||
|
public int VendorID
|
|||
|
{
|
|||
|
get { return _nVendorID; }
|
|||
|
set { _nVendorID = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ChalanNumber
|
|||
|
private string _sChalanNumber;
|
|||
|
public string ChalanNumber
|
|||
|
{
|
|||
|
get { return _sChalanNumber; }
|
|||
|
set { _sChalanNumber = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region EffectDate
|
|||
|
private DateTime _dEffectDate;
|
|||
|
public DateTime EffectDate
|
|||
|
{
|
|||
|
get { return _dEffectDate; }
|
|||
|
set { _dEffectDate = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Amount
|
|||
|
private double _dAmount;
|
|||
|
public double Amount
|
|||
|
{
|
|||
|
get { return _dAmount; }
|
|||
|
set { _dAmount = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region PaymentMode
|
|||
|
private EnumVendorPaymentMode _ePaymentMode;
|
|||
|
public EnumVendorPaymentMode PaymentMode
|
|||
|
{
|
|||
|
get { return _ePaymentMode; }
|
|||
|
set { _ePaymentMode = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Remarks
|
|||
|
private string _sRemarks;
|
|||
|
public string Remarks
|
|||
|
{
|
|||
|
get { return _sRemarks; }
|
|||
|
set { _sRemarks = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IsAdvance
|
|||
|
private bool _bIsAdvance;
|
|||
|
public bool IsAdvance
|
|||
|
{
|
|||
|
get { return _bIsAdvance; }
|
|||
|
set { _bIsAdvance = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IsFullPaid
|
|||
|
private bool _bIsFullPaid;
|
|||
|
public bool IsFullPaid
|
|||
|
{
|
|||
|
get { return _bIsFullPaid; }
|
|||
|
set { _bIsFullPaid = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
#region Service Factory
|
|||
|
internal static IVendorBillService Service
|
|||
|
{
|
|||
|
get { return Services.Factory.CreateService<IVendorBillService>(typeof(IVendorBillService)); }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Functions
|
|||
|
|
|||
|
//public static VendorBill Get(int vendorBillId)
|
|||
|
//{
|
|||
|
// VendorBill oVendorBill = null;
|
|||
|
// #region Cache Header
|
|||
|
// oVendorBill = (VendorBill)_cache["Get", vendorBillId];
|
|||
|
// if (oVendorBill != null)
|
|||
|
// return oVendorBill;
|
|||
|
// #endregion
|
|||
|
// oVendorBill = VendorBill.Service.Get(vendorBillId);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oVendorBill, "Get", vendorBillId);
|
|||
|
// #endregion
|
|||
|
// return oVendorBill;
|
|||
|
//}
|
|||
|
//public int Save()
|
|||
|
//{
|
|||
|
// this.SetAuditTrailProperties();
|
|||
|
// return VendorBill.Service.Save(this);
|
|||
|
//}
|
|||
|
|
|||
|
//public void Delete(int id)
|
|||
|
//{
|
|||
|
// VendorBill.Service.Delete(id);
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
//#region Collection Functions
|
|||
|
|
|||
|
//public static List<VendorBill> Get()
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
// List<VendorBill> vendorBills = _cache["Get"] as List<VendorBill>;
|
|||
|
// if (vendorBills != null)
|
|||
|
// return vendorBills;
|
|||
|
// #endregion
|
|||
|
// vendorBills = VendorBill.Service.Get();
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(vendorBills, "Get");
|
|||
|
// #endregion
|
|||
|
// return vendorBills;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<VendorBill> Get(EnumVendorPaymentMode paymentMode)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<VendorBill> vendorBills = _cache["Get", paymentMode] as List<VendorBill>;
|
|||
|
// if (vendorBills != null)
|
|||
|
// return vendorBills;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// vendorBills = VendorBill.Service.Get(paymentMode);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(vendorBills, "Get", paymentMode);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return vendorBills;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<VendorBill> GetByVendorID(int id)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
// List<VendorBill> vendorBills = _cache["Get",id] as List<VendorBill>;
|
|||
|
// if (vendorBills != null)
|
|||
|
// return vendorBills;
|
|||
|
// #endregion
|
|||
|
// vendorBills = VendorBill.Service.GetByVendorID(id);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(vendorBills, "Get",id);
|
|||
|
// #endregion
|
|||
|
// return vendorBills;
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IVendorBill Service
|
|||
|
public interface IVendorBillService
|
|||
|
{
|
|||
|
VendorBill Get(int id);
|
|||
|
List<VendorBill> GetByVendorID(int id);
|
|||
|
List<VendorBill> Get();
|
|||
|
List<VendorBill> Get(EnumVendorPaymentMode paymentMode);
|
|||
|
int Save(VendorBill oVendorBill);
|
|||
|
void Delete(int id);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|