public virtual CoinrateDomain CreateCoinrateDomain() { CoinrateEntity entity = new CoinrateEntity(); entity.CoinrateId = Guid.NewGuid().ToString(); return new CoinrateDomain(entity); }
///<summary> /// Set entity data ///</summary> private void SetEntity(CoinrateEntity objEntity) { CoinRate_Id = objEntity.CoinrateId; txtCode.Text = objEntity.CoinrateCode; txtValue.Text = objEntity.CoinrateValue.ToString(); chkIsCurrent.Checked = objEntity.Iscurrent; txtDescription.Text = objEntity.CoinrateDescription; this.txtStartDate.DateValue = objEntity.Startdate.ToString("yyy-MM-dd"); this.txtEndDate.DateValue = objEntity.Enddate.ToString("yyy-MM-dd"); txtCode.Focus(); }
public virtual void UpdateCoinrateEntity(CoinrateEntity entity, DataAccessBroker broker) { DataAccess.Update(entity, broker); }
public virtual void InsertCoinrateEntity(CoinrateEntity entity, DataAccessBroker broker) { DataAccess.Insert(entity, broker); }
public virtual bool CheckInsertIsExist(string code) { CoinrateEntity entity = new CoinrateEntity(); entity.CoinrateCode = code; return DataAccess.Select<CoinrateEntity>(entity).Count > 0; }
//public virtual List<ChkFunctionParamEntity> GetChkFunctionParasByFunctionId(string functionId) //{ // return SelectByCondition<ChkFunctionParamEntity>(adidas.DataCollection.Common.Utils.QueryCondition.Create().Equals(ChkFunctionParamTable.C_FUNCTION_ID, functionId).Order(ChkFunctionParamTable.C_SORT_ORDER)); //} //public virtual void InsertChkFUnctionParas(List<ChkFunctionParamEntity> functionParas, DataAccessBroker broker) //{ // DataAccess.Insert(functionParas, broker); //} //public virtual void DeleteChkFunctionParasByCondition(ChkFunctionParamEntity param, DataAccessBroker broker) //{ // DataAccess.DeleteEntity(param, broker); //} public virtual DataSet Search(string code) { CoinrateEntity entity = new CoinrateEntity(); if (!string.IsNullOrEmpty(code)) entity.CoinrateCode = code; return DataAccess.SelectDataSet(entity); }
public CoinrateDomain(CoinrateEntity entity) : base(entity) { masterEntity = entity; }
private CoinrateEntity GetEntity() { CoinrateEntity objEntity = null; if (!string.IsNullOrEmpty(CoinRate_Id)) objEntity = MainService.CoinrateBLLService.GetCoinrateEntityById(CoinRate_Id); else { objEntity = new CoinrateEntity(); objEntity.CoinrateId = Guid.NewGuid().ToString(); } objEntity.CoinrateCode = txtCode.Text.Trim(); objEntity.CoinrateValue = decimal.Parse(txtValue.Text.Trim()); objEntity.Iscurrent = chkIsCurrent.Checked; objEntity.CoinrateDescription = txtDescription.Text.Trim(); objEntity.Startdate = DateTime.Parse(this.txtStartDate.DateValue); objEntity.Enddate = DateTime.Parse(this.txtEndDate.DateValue); return objEntity; }