public LienEntryDetailsForEdit GetLienentryforEdit(long lienid, string connectionstring) { LienEntryDetailsForEdit _lienentrydataforedit = new LienEntryDetailsForEdit(); try { NpgsqlDataReader dr; using (dr = NPGSqlHelper.ExecuteReader(connectionstring, CommandType.Text, "SELECT tl.lienid,tl.liendate,tm.memberid,tl.membercode,tf.fdaccountid,tl.fdaccountno,tl.lienamount,tl.companybranch as tobranch,tf.chitbranchname as branchname,tl.lienadjuestto FROM tbltranslienentry tl join tblmstmembers tm on tl.membercode=tm.membercode join tbltransfdcreation tf on tf.fdaccountno=tl.fdaccountno where lienid = " + lienid + " and tl.statusid = " + Convert.ToInt32(Status.Active) + "")) { if (dr.Read()) { _lienentrydataforedit = new LienEntryDetailsForEdit { pLienid = dr["lienid"], pLienDate = dr["liendate"], pMemberId = dr["memberid"], pMemberCode = dr["membercode"], pFdAccountid = dr["fdaccountid"], pFdaccountno = dr["fdaccountno"], pLienamount = dr["lienamount"], pTobranch = dr["tobranch"], pBranchname = dr["branchname"], pLienadjuestto = dr["lienadjuestto"], }; } } } catch (Exception) { throw; } return(_lienentrydataforedit); }
public IActionResult GetLienentryforEdit(Int64 Lienid) { LienEntryDetailsForEdit lstLeinentryedit = new LienEntryDetailsForEdit(); try { lstLeinentryedit = Objlienentry.GetLienentryforEdit(Lienid, Con); } catch (Exception ex) { throw new FinstaAppException(ex.ToString()); } return(Ok(lstLeinentryedit)); }