Exemplo n.º 1
0
 private object[] Take(GLVoucherListDetailEntity gLVoucherListDetailEntity)
 {
     return(new object[]
     {
         "@RefDetailID", gLVoucherListDetailEntity.RefDetailId,
         "@RefID", gLVoucherListDetailEntity.RefId,
         "@DetailRefType", gLVoucherListDetailEntity.DetailRefType,
         "@DetailID", gLVoucherListDetailEntity.DetailId,
         "@SortOrder", gLVoucherListDetailEntity.SortOrder,
         "@EntryType", gLVoucherListDetailEntity.EntryType,
         "@DetailRefID", gLVoucherListDetailEntity.DetailRefId,
     });
 }
        public List <GLVoucherListDetailEntity> GLVoucherListDetails(List <GLVoucherListDetail> details, string refid)
        {
            List <GLVoucherListDetailEntity> lstDetailEntities = new List <GLVoucherListDetailEntity>();

            foreach (var result in details)
            {
                var newresult = new GLVoucherListDetailEntity();
                newresult.RefDetailId   = result.RefDetailID.ToString();
                newresult.RefId         = refid;
                newresult.DetailRefType = result.DetailRefType ?? 0;
                newresult.DetailId      = result.DetailID.ToString();
                newresult.SortOrder     = result.SortOrder ?? 0;
                newresult.EntryType     = result.EntryType ?? 0;
                //newresult.DetailRefId = result.DetailRefID;
                lstDetailEntities.Add(newresult);
            }
            return(lstDetailEntities);
        }
Exemplo n.º 3
0
        public string InsertGLVoucherListDetail(GLVoucherListDetailEntity glVoucherListDetail)
        {
            const string sql = @"uspInsert_GLVoucherListDetail";

            return(Db.Insert(sql, true, Take(glVoucherListDetail)));
        }