Esempio n. 1
0
        public TaskExchangeCompositeType GetTaskExchangeByIdTaskIdExchangeTaskPre(TaskExchangeCompositeType tect)
        {
            param    = new SqlParameter[2];
            param[0] = new SqlParameter("@fiid_exchange", SqlDbType.Int)
            {
                Value = tect.iExchange
            };
            param[1] = new SqlParameter("@finext_task", SqlDbType.Int)
            {
                Value = tect.iNextTask
            };
            DataTable dt = objDB.ExecStore("sp_selectTskExchangeByIdTaskIdExchangeIdNextTask", param);

            //tect.bAlarm = bool.Parse(dt.Rows[0].ItemArray[7].ToString());
            tect.dTiming         = DateTime.Parse(dt.Rows[0].ItemArray[6].ToString());
            tect.iArea           = int.Parse(dt.Rows[0].ItemArray[8].ToString());
            tect.iEmployed       = int.Parse(dt.Rows[0].ItemArray[5].ToString());
            tect.iExchange       = int.Parse(dt.Rows[0].ItemArray[4].ToString());
            tect.iIdTaskExchange = int.Parse(dt.Rows[0].ItemArray[0].ToString());
            tect.iNextTask       = int.Parse(dt.Rows[0].ItemArray[2].ToString());
            tect.iTask           = int.Parse(dt.Rows[0].ItemArray[3].ToString());
            tect.iTiming         = int.Parse(dt.Rows[0].ItemArray[1].ToString());
            tect.iTimingTotal    = int.Parse(dt.Rows[0].ItemArray[13].ToString());
            tect.sArea           = dt.Rows[0].ItemArray[8].ToString();
            tect.sEmployed       = dt.Rows[0].ItemArray[12].ToString();
            tect.sNestTask       = dt.Rows[0].ItemArray[11].ToString();
            tect.sNumberArea     = dt.Rows[0].ItemArray[10].ToString();
            tect.sTask           = dt.Rows[0].ItemArray[7].ToString();
            return(tect);
        }
Esempio n. 2
0
        public errorCompositeType UpdateTaskExchange(TaskExchangeCompositeType tect, string sDesencadenante)
        {
            var lstError = new errorCompositeType();

            try
            {
                param    = new SqlParameter[9];
                param[0] = new SqlParameter("@fvtiming_task_exchange", SqlDbType.Int)
                {
                    Value = tect.iTiming
                };
                param[1] = new SqlParameter("@finext_task", SqlDbType.Int)
                {
                    Value = tect.iNextTask
                };
                param[2] = new SqlParameter("@fiid_task", SqlDbType.Int)
                {
                    Value = tect.iTask
                };
                param[3] = new SqlParameter("@fiid_exchange", SqlDbType.Int)
                {
                    Value = tect.iExchange
                };
                param[4] = new SqlParameter("@fiid_employed", SqlDbType.Int)
                {
                    Value = tect.iEmployed
                };
                param[5] = new SqlParameter("@fi_timing_total", SqlDbType.Int)
                {
                    Value = tect.iTimingTotal
                };
                param[6] = new SqlParameter("@fvtiming_task_exchange_Date", SqlDbType.DateTime)
                {
                    Value = tect.dTiming
                };
                param[7] = new SqlParameter("@fiid_task_exchange", SqlDbType.Int)
                {
                    Value = tect.iIdTaskExchange
                };
                param[8] = new SqlParameter("@fvDesencadenante", SqlDbType.VarChar)
                {
                    Value = sDesencadenante
                };
                objDB.ExecStoredIUD("[sp_updateTaskExchange]", param);
                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
Esempio n. 3
0
        public errorCompositeType InsertTaskExchange(TaskExchangeCompositeType tect)
        {
            var lstError = new errorCompositeType();

            try
            {
                param    = new SqlParameter[8];
                param[0] = new SqlParameter("@fvtiming_task_exchange", SqlDbType.Int)
                {
                    Value = tect.iTiming
                };
                param[1] = new SqlParameter("@finext_task", SqlDbType.Int)
                {
                    Value = tect.iNextTask
                };
                param[2] = new SqlParameter("@fiid_task", SqlDbType.Int)
                {
                    Value = tect.iTask
                };
                param[3] = new SqlParameter("@fiid_exchange", SqlDbType.Int)
                {
                    Value = tect.iExchange
                };
                param[4] = new SqlParameter("@fiid_employed", SqlDbType.Int)
                {
                    Value = tect.iEmployed
                };
                param[5] = new SqlParameter("@fi_timing_total", SqlDbType.Int)
                {
                    Value = tect.iTimingTotal
                };
                param[6] = new SqlParameter("@fvtiming_task_exchange_Date", SqlDbType.DateTime)
                {
                    Value = tect.dTiming
                };
                param[7] = new SqlParameter("@fiGroup", SqlDbType.Int)
                {
                    Value = tect.iGroup
                };
                objDB.ExecStoredIUD("sp_insertTaskExchange", param);
                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
Esempio n. 4
0
        public int GetCountTaskExchangeByIdTaskIdExchangeTaskPre(TaskExchangeCompositeType tect)
        {
            param    = new SqlParameter[2];
            param[0] = new SqlParameter("@finext_task", SqlDbType.Int)
            {
                Value = tect.iNextTask
            };
            param[1] = new SqlParameter("@fiid_exchange", SqlDbType.Int)
            {
                Value = tect.iExchange
            };
            DataTable dt = objDB.ExecStore("sp_selectCountTskExchangeByIdTaskIdExchangeIdNextTask", param);

            return(int.Parse(dt.Rows[0].ItemArray[0].ToString()));
        }