コード例 #1
0
ファイル: Upload.cs プロジェクト: acorallo/Interassist
        public static List<Upload> List(FiltroUpload f, out int RecordCount)
        {
            List<Upload> resultList = new List<Upload>();

            try
            {
                UploaDS dataservice = new UploaDS();
                DataSet ds = dataservice.List(f, out RecordCount);

                if (ds.Tables.Count > 0)

                    foreach (DataRow r in ds.Tables[0].Rows)
                    {
                        Upload a = new Upload();
                        ORM(a, r);
                        resultList.Add(a);
                    }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return resultList;
        }
コード例 #2
0
ファイル: Upload.cs プロジェクト: acorallo/Interassist
        public static Upload GetById(int id)
        {
            Upload Result = null;

            try
            {
                UploaDS DS = new UploaDS();
                String objectHash = Guid.NewGuid().ToString();
                DataRow dr = DS.GetObjectById(id, objectHash);

                if (dr != null)
                {
                    Result = new Upload();
                    ORM(Result, dr);
                }

            }
            catch (Exception ex)
            {
                throw ex;
            }

            return Result;
        }