private void SetChequeControls(Data.Check cheque) { try { var fund = Business.GetFundsBusiness().GetById(cheque.CBank.ToGUID()); if (fund == null) { return; } txtCheque.Text = string.Format("{0}{1}{2}", cheque.CNO, Localize.Cheque_Fund_Seperator, fund.FBank); txtPrice.Text = cheque.CPrice.ToString(Localize.DoubleMaskType); } catch { throw; } }
private Guid?SaveCheque(Data.TreasuryDetail treasuryDetail) { try { var cheque = Business.GetChequeBusiness().GetById(treasuryDetail.IDCheck.ToGUID()); if (cheque == null) { cheque = new Data.Check(); } cheque.CNO = txtNumCheque.Text; cheque.CPrice = txtChequePrice.Text.ToDecimal(); cheque.CDate = dtpChequeDate.Text; cheque.CBank = FundId; cheque.CType = Common.Constants.ChequeType.Recive; Business.GetChequeBusiness().Save(cheque); return(cheque.ID); } catch { throw; } }