示例#1
0
文件: Task.cs 项目: cafc79/SIA
        public taskCompositeType GetTaskById(int iIdTask)
        {
            taskCompositeType et = new taskCompositeType();

            param    = new SqlParameter[1];
            param[0] = new SqlParameter("@fiid_task", SqlDbType.Int)
            {
                Value = iIdTask
            };
            DataTable dt = objDB.ExecStore("sp_getTaskById", param);

            et.iIdTask          = int.Parse(dt.Rows[0].ItemArray[0].ToString());
            et.sDescription     = dt.Rows[0].ItemArray[1].ToString();
            et.bStatus          = bool.Parse(dt.Rows[0].ItemArray[2].ToString());
            et.iIdArea          = int.Parse(dt.Rows[0].ItemArray[3].ToString());
            et.sDescriptionArea = dt.Rows[0].ItemArray[4].ToString();
            return(et);
        }
示例#2
0
文件: Task.cs 项目: cafc79/SIA
        /// <summary>
        /// Obtiene todos los Tipos de Cambio
        /// </summary>
        /// <returns></returns>
        public List <taskCompositeType> getAll()
        {
            List <taskCompositeType> lst = new List <taskCompositeType>();
            DataTable dt = objDB.Consult("sp_selectTask");

            foreach (DataRow dr in dt.Rows)
            {
                var et = new taskCompositeType
                {
                    iIdTask          = int.Parse(dr.ItemArray[0].ToString()),
                    sDescription     = dr.ItemArray[1].ToString(),
                    bStatus          = bool.Parse(dr.ItemArray[2].ToString()),
                    iIdArea          = int.Parse(dr.ItemArray[3].ToString()),
                    sDescriptionArea = dr.ItemArray[4].ToString()
                };
                lst.Add(et);
            }
            return(lst);
        }