public ClosingFilesModel SelectClosingFile(string createdBy) { var query = $@" Select [ClosingNumber], [Id], from ClosingFiles Where [CreatedBy_Id]='{createdBy}' And [FileStatus] = 0"; ClosingFilesModel closingFileName = _conn.Connection.QueryFirstOrDefault <ClosingFilesModel>(query); return(closingFileName); }
public ClosingFilesModel SelectClosingFileWithBuyer(string closingNumber, int createdBy) { var query = $@" Select cf.ClosingNumber, cfb.Id ,am.FirstName, am.LastName from ClosingFileBuyerSellers cfb Join ClosingFiles cf ON cf.[Id] = cfb.[ClosingFileId] Join AppMember am ON am.id = cfb.[AppMemberId] Where cf.ClosingNumber = '{closingNumber}' And cf.CreatedBy_Id={createdBy} And cf.FileStatus = 0 And cfb.BuyerSellerEntityType = 0 And cfb.BuyerOrSellerType = 0 order by cf.Id desc"; ClosingFilesModel closingFileName = _conn.Connection.QueryFirstOrDefault <ClosingFilesModel>(query); return(closingFileName); }