Пример #1
0
        public TaskDataCompositeType GetTaskDataById(int iIdTaskData)
        {
            TaskDataCompositeType et = new TaskDataCompositeType();

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

            et.iIdTaskData      = int.Parse(dt.Rows[0].ItemArray[0].ToString());
            et.iIdTask          = int.Parse(dt.Rows[0].ItemArray[1].ToString());
            et.iIdData          = int.Parse(dt.Rows[0].ItemArray[2].ToString());
            et.bStatus          = bool.Parse(dt.Rows[0].ItemArray[3].ToString());
            et.sDescriptionTask = dt.Rows[0].ItemArray[4].ToString();
            et.sDescriptionData = dt.Rows[0].ItemArray[5].ToString();
            et.sDescription     = dt.Rows[0].ItemArray[6].ToString();
            return(et);
        }
Пример #2
0
        /// <summary>
        /// Obtiene todos los Tipos de Cambio
        /// </summary>
        /// <returns></returns>
        public List <TaskDataCompositeType> getAll()
        {
            List <TaskDataCompositeType> lst = new List <TaskDataCompositeType>();
            DataTable dt = objDB.Consult("sp_selectTaskData");

            foreach (DataRow dr in dt.Rows)
            {
                var et = new TaskDataCompositeType
                {
                    iIdTaskData      = int.Parse(dr.ItemArray[0].ToString()),
                    iIdTask          = int.Parse(dr.ItemArray[1].ToString()),
                    iIdData          = int.Parse(dr.ItemArray[2].ToString()),
                    bStatus          = bool.Parse(dr.ItemArray[3].ToString()),
                    sDescriptionTask = dr.ItemArray[4].ToString(),
                    sDescriptionData = dr.ItemArray[5].ToString(),
                    sDescription     = dr.ItemArray[6].ToString()
                };
                lst.Add(et);
            }
            return(lst);
        }