public errorCompositeType UpdateTaskData(int iIdTaskData, int iIdArea, int iIdGroup, String sDescription) { errorCompositeType lstError = new errorCompositeType(); try { param = new SqlParameter[4]; param[0] = new SqlParameter("@fiid_task_data", SqlDbType.Int) { Value = iIdTaskData }; param[1] = new SqlParameter("@fiid_task", SqlDbType.Int) { Value = iIdArea }; param[2] = new SqlParameter("@fiid_data", SqlDbType.Int) { Value = iIdGroup }; param[3] = new SqlParameter("@fvdescription", SqlDbType.VarChar) { Value = sDescription }; objDB.ExecStore("sp_updateTaskData", param); lstError.bError = true; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public errorCompositeType UpdateTaskGroup(int iIdTaskGroup, int iIdArea, int iIdGroup) { errorCompositeType lstError = new errorCompositeType(); try { param = new SqlParameter[3]; param[0] = new SqlParameter("@fiid_task_group", SqlDbType.Int); param[0].Value = iIdTaskGroup; param[1] = new SqlParameter("@fiid_task", SqlDbType.Int); param[1].Value = iIdArea; param[2] = new SqlParameter("@fiid_group", SqlDbType.Int); param[2].Value = iIdGroup; objDB.ExecStore("sp_updateTaskGroup", param); lstError.bError = true; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public errorCompositeType UpdatePartList(int iIdPartList, String iNumber, String sDescription, String iPartListClient) { var lstError = new errorCompositeType(); try { param = new SqlParameter[4]; param[0] = new SqlParameter("@fiid_part_list", SqlDbType.Int) { Value = iIdPartList }; param[1] = new SqlParameter("@fvnumber_part_DS", SqlDbType.VarChar) { Value = iNumber }; param[2] = new SqlParameter("@fvaffectation_part", SqlDbType.VarChar) { Value = sDescription }; param[3] = new SqlParameter("@finumber_part_client", SqlDbType.VarChar) { Value = iPartListClient }; objDB.ExecStore("sp_updatePartList", param); lstError.bError = true; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public errorCompositeType UpdatePlant(int iIdPlant, String sDescription) { errorCompositeType lstError = new errorCompositeType(); try { param = new SqlParameter[2]; param[0] = new SqlParameter("@fiid_plant", SqlDbType.Int); param[0].Value = iIdPlant; param[1] = new SqlParameter("@fvdescription_plant", SqlDbType.VarChar); param[1].Value = sDescription; objDB.ExecStore("sp_updatePlant", param); lstError.bError = true; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public errorCompositeType UpdateAffectationType(int iIdAffectationType, String sDescription) { var lstError = new errorCompositeType(); try { param = new SqlParameter[2]; param[0] = new SqlParameter("@fiid_affectation_type", SqlDbType.Int) { Value = iIdAffectationType }; param[1] = new SqlParameter("@fvdescription_affectation_type", SqlDbType.VarChar) { Value = sDescription }; objDB.ExecStore("sp_updateAffectationType", param); lstError.bError = true; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public errorCompositeType UpdateReason(int iIdReason, int iNumber, String sDescription) { errorCompositeType lstError = new errorCompositeType(); try { param = new SqlParameter[3]; param[0] = new SqlParameter("@fiid_reason", SqlDbType.Int); param[0].Value = iIdReason; param[1] = new SqlParameter("@finumber_reason", SqlDbType.Int); param[1].Value = iNumber; param[2] = new SqlParameter("@fvdescription_reason", SqlDbType.VarChar); param[2].Value = sDescription; objDB.ExecStore("sp_updateReason", param); lstError.bError = true; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public errorCompositeType UpdateExchangeType(int iIdExchangeType, String sDescription, String sInitial) { errorCompositeType lstError = new errorCompositeType(); try { param = new SqlParameter[3]; param[0] = new SqlParameter("@fiid_Exchange_type", SqlDbType.Int); param[0].Value = iIdExchangeType; param[1] = new SqlParameter("@fvdescription_Exchange_type", SqlDbType.VarChar); param[1].Value = sDescription; param[2] = new SqlParameter("@fcinitial", SqlDbType.VarChar); param[2].Value = sInitial; objDB.ExecStore("sp_updateExchangeType", param); lstError.bError = true; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public int GetExchangeAutorizationByIdCount(int idExchange) { param = new SqlParameter[1]; param[0] = new SqlParameter("@fiid_Exchange", SqlDbType.Int) { Value = idExchange }; return(int.Parse(objDB.ExecStore("sp_selectCountExchangeAutorizationByIdExchange", param).Rows[0].ItemArray[0].ToString())); }
public errorCompositeType UpdatePartListExchange(int iIdListPartExchange, int iIdPartList, int iIdAffectation, int iIdExchange) { var lstError = new errorCompositeType(); try { param = new SqlParameter[4]; param[0] = new SqlParameter("@fiid_Exchange_part_list", SqlDbType.Int) { Value = iIdListPartExchange }; param[1] = new SqlParameter("@fiid_part_list", SqlDbType.Int) { Value = iIdPartList }; param[2] = new SqlParameter("@fiid_Exchange", SqlDbType.Int) { Value = iIdExchange }; param[3] = new SqlParameter("@fiid_affectation_type", SqlDbType.Int) { Value = iIdAffectation }; objDB.ExecStore("sp_updatePartListExchange", param); lstError.bError = true; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public DataTable GetUsuarios() { try { return(objDB.ExecStore("sp_selectUserAll", null)); } catch { throw new Exception(); } }
public DataTable GetExchangeByPreFolio(String sPreFolio) { param = new SqlParameter[1]; param[0] = new SqlParameter("@fvprefolio", SqlDbType.VarChar) { Value = sPreFolio }; return(objDB.ExecStore("sp_selectExchange_srch", param)); }
public int GetCountAffectationDocumetsByExchangeId(int iIdExchange) { var adct = new affectationDocumentsCompositeType(); param = new SqlParameter[1]; param[0] = new SqlParameter("@fiid_Exchange_affectation", SqlDbType.Int) { Value = iIdExchange }; DataTable dt = objDB.ExecStore("sp_selectCountDocumentsAffectationByIdExchange", param); return(int.Parse(dt.Rows[0].ItemArray[0].ToString())); }
public List <ExchangeReviewCompositeType> getAll(int iIdExchange) { param = new SqlParameter[1]; param[0] = new SqlParameter("@fiid_Exchange", SqlDbType.Int) { Value = iIdExchange }; var dt = objDB.ExecStore("sp_selectReviewExchangeByIdExchange", param); return((from DataRow dr in dt.Rows select new ExchangeReviewCompositeType { iIdReviewExchange = int.Parse(dr.ItemArray[0].ToString()), sDescription = dr.ItemArray[1].ToString(), iIdReviewType = int.Parse(dr.ItemArray[2].ToString()), iIdExchange = int.Parse(dr.ItemArray[3].ToString()), iIdUser = int.Parse(dr.ItemArray[4].ToString()), bStatus = bool.Parse(dr.ItemArray[5].ToString()), sReview = dr.ItemArray[6].ToString(), sCompleteName = dr.ItemArray[7].ToString() }).ToList()); }
public DataTable GetFolios(String sFolio) { try { param = new SqlParameter[1]; param[0] = new SqlParameter("@strFolio", SqlDbType.VarChar) { Value = sFolio }; return(objDB.ExecStore("sp_selectReleaseClientExchange", param)); } catch { throw new Exception(); } }
public DataTable GetMessages(int iUsuario) { try { param = new SqlParameter[1]; param[0] = new SqlParameter("@iUsuario", SqlDbType.Int) { Value = iUsuario }; return(objDB.ExecStore("sp_selectGetMessages", param)); } catch { throw new Exception(); } }
public List <menuRolCompositeType> GetMenuRolById(int iRol) { param = new SqlParameter[1]; param[0] = new SqlParameter("@fiRol", SqlDbType.SmallInt) { Value = iRol }; DataTable dt = objDB.ExecStore("sp_selectMenuRol", param); return((from DataRow dr in dt.Rows select new menuRolCompositeType { iIdMenu = int.Parse(dr.ItemArray[0].ToString()), sDescription = dr.ItemArray[1].ToString(), sModulo = dr.ItemArray[2].ToString() }).ToList()); }
public DataTable GetAreaOperativa(object iIdArea, object sFolio, object sPreFolio, object dFechaIni, object dFechaFin) { try { param = new SqlParameter[5]; param[0] = new SqlParameter("@idArea", SqlDbType.Int) { Value = iIdArea }; param[1] = new SqlParameter("@strFolio", SqlDbType.VarChar) { Value = sFolio }; param[2] = new SqlParameter("@strPreFolio", SqlDbType.VarChar) { Value = sPreFolio }; param[3] = new SqlParameter("@fechaIni", SqlDbType.DateTime) { Value = dFechaIni }; param[4] = new SqlParameter("@fechaFinal", SqlDbType.DateTime) { Value = dFechaFin }; return(objDB.ExecStore("sp_reportOperativeArea", param)); } catch { throw new Exception(); } }
public DataRow GetSalesAutorization(int iExchange) { param = new SqlParameter[1]; param[0] = new SqlParameter("@iExchange", SqlDbType.Int) { Value = iExchange }; return(objDB.ExecStore("sp_selectSalesAutorization", param).Rows[0]); }
public errorCompositeType UpdateEmployed(int iIdEmployed, int iNumber, String sName, String sMotherLastName, String sFatherLasteName, String sEMail, int iIdARea, int iIdPlant, int iBoss, int iSubstitute) { errorCompositeType lstError = new errorCompositeType(); int iEstatus = 1; try { param = new SqlParameter[11]; param[0] = new SqlParameter("@fiid_employed", SqlDbType.Int); param[0].Value = iIdEmployed; param[1] = new SqlParameter("@finumber_employed", SqlDbType.Int); param[1].Value = iNumber; param[2] = new SqlParameter("@fvname_employed", SqlDbType.VarChar); param[2].Value = sName; param[3] = new SqlParameter("@fvmother_last_name", SqlDbType.VarChar); param[3].Value = sMotherLastName; param[4] = new SqlParameter("@fvfather_last_name", SqlDbType.VarChar); param[4].Value = sFatherLasteName; param[5] = new SqlParameter("@fvemail_employed", SqlDbType.VarChar); param[5].Value = sEMail; param[6] = new SqlParameter("@fiid_area", SqlDbType.Int); param[6].Value = iIdARea; param[7] = new SqlParameter("@fiid_plant", SqlDbType.Int); param[7].Value = iIdPlant; param[8] = new SqlParameter("@fistatus_employed", SqlDbType.Int); param[8].Value = iEstatus; param[9] = new SqlParameter("@fiid_boss", SqlDbType.Int); param[9].Value = iBoss; param[10] = new SqlParameter("@fiid_substitute", SqlDbType.Int); param[10].Value = iSubstitute; objDB.ExecStore("sp_updateEmployed", param); lstError.bError = true; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public void InsertTaskAutorizatio(int iIdExchange, int iArea, int iReview, string sObservaciones) { param = new SqlParameter[4]; param[0] = new SqlParameter("@Exchange", SqlDbType.Int) { Value = iIdExchange }; param[1] = new SqlParameter("@TasksArea", SqlDbType.Int) { Value = iArea }; param[2] = new SqlParameter("@Review", SqlDbType.Int) { Value = iReview }; param[3] = new SqlParameter("@Observaciones", SqlDbType.VarChar) { Value = sObservaciones }; objDB.ExecStore("sp_insertTaskAutorization", param); }
public errorCompositeType UpdateArea(int iIdArea, String sDescription, int iNumber, int iResponsable) { var lstError = new errorCompositeType(); try { param = new SqlParameter[4]; param[0] = new SqlParameter("@fiid_area", SqlDbType.Int) { Value = iIdArea }; param[1] = new SqlParameter("@fvdescription_area", SqlDbType.VarChar) { Value = sDescription }; param[2] = new SqlParameter("@finumber_area", SqlDbType.Int) { Value = iNumber }; param[3] = new SqlParameter("@fiManager", SqlDbType.Int) { Value = iResponsable }; objDB.ExecStore("sp_updateArea", param); lstError.bError = true; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public TaskExchangeCompositeType GetTaskExchangeByIdTaskIdExchange(TaskExchangeCompositeType tect) { param = new SqlParameter[2]; param[0] = new SqlParameter("@fiid_task", SqlDbType.Int) { Value = tect.iTask }; param[1] = new SqlParameter("@fiid_exchange", SqlDbType.Int) { Value = tect.iExchange }; DataTable dt = objDB.ExecStore("sp_selectTskExchangeByIdTaskIdExchange", 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); }
public DataTable GetBoss(int iArea) { try { param = new SqlParameter[1]; param[0] = new SqlParameter("@fiid_area", SqlDbType.Int) { Value = iArea }; return(objDB.ExecStore("sp_ddlEmployedbyArea", param)); } catch { throw new Exception(); } }
public List<actionRolCompositeType> GetActionRolById(int iIdRol) { var lst = new List<actionRolCompositeType>(); param = new SqlParameter[1]; param[0] = new SqlParameter("@fiRol", SqlDbType.SmallInt) {Value = iIdRol}; DataTable dt = objDB.ExecStore("sp_selectActionxRol", param); foreach (DataRow dr in dt.Rows) { var ut = new actionRolCompositeType { iIdAction = int.Parse(dr.ItemArray[0].ToString()), sDescription = dr.ItemArray[1].ToString(), bStatus = Boolean.Parse(dr.ItemArray[2].ToString()) }; lst.Add(ut); } return lst; }
public DataTable GetFolios(String sFolio, int iOption) { try { param = new SqlParameter[2]; param[0] = new SqlParameter("@strFolio", SqlDbType.VarChar) { Value = sFolio }; param[1] = new SqlParameter("@intType", SqlDbType.Int) { Value = iOption }; return(objDB.ExecStore("sp_selectFolio", param)); } catch { throw new Exception(); } }
public QuoteCompositeType getQuoteByIdExchangeIdPartList(QuoteCompositeType ect) { param = new SqlParameter[2]; param[0] = new SqlParameter("@fiid_exchange", SqlDbType.Int) { Value = ect.iExchange }; param[1] = new SqlParameter("@fiid_part_list", SqlDbType.Int) { Value = ect.iPartList }; DataTable dt = objDB.ExecStore("sp_selectQuoteByIdExchangeIdPartList", param); var qct = new QuoteCompositeType { iIdQuote = int.Parse(dt.Rows[0].ItemArray[0].ToString()), iExchange = int.Parse(dt.Rows[0].ItemArray[1].ToString()), iPartList = int.Parse(dt.Rows[0].ItemArray[2].ToString()), sParte = dt.Rows[0].ItemArray[3].ToString(), sNoPart = dt.Rows[0].ItemArray[4].ToString(), sClient = dt.Rows[0].ItemArray[5].ToString(), sDescription = dt.Rows[0].ItemArray[6].ToString(), sProyect = dt.Rows[0].ItemArray[7].ToString(), SOPCliente = dt.Rows[0].ItemArray[8].ToString(), dIn = DateTime.Parse(dt.Rows[0].ItemArray[9].ToString()), dOut = DateTime.Parse(dt.Rows[0].ItemArray[11].ToString()), dProm = DateTime.Parse(dt.Rows[0].ItemArray[10].ToString()), bMoldProt = bool.Parse(dt.Rows[0].ItemArray[12].ToString()), iMoldProt = decimal.Parse(dt.Rows[0].ItemArray[13].ToString()), bMoldSerie = bool.Parse(dt.Rows[0].ItemArray[14].ToString()), iMoldSerie = decimal.Parse(dt.Rows[0].ItemArray[15].ToString()), bCF = bool.Parse(dt.Rows[0].ItemArray[16].ToString()), iCF = decimal.Parse(dt.Rows[0].ItemArray[17].ToString()), bDevice = bool.Parse(dt.Rows[0].ItemArray[18].ToString()), iDevice = decimal.Parse(dt.Rows[0].ItemArray[19].ToString()), bObsolet = bool.Parse(dt.Rows[0].ItemArray[20].ToString()), iObsolet = decimal.Parse(dt.Rows[0].ItemArray[21].ToString()), bEngMan = bool.Parse(dt.Rows[0].ItemArray[22].ToString()), iEngMan = decimal.Parse(dt.Rows[0].ItemArray[23].ToString()), bDesign = bool.Parse(dt.Rows[0].ItemArray[24].ToString()), iDesign = decimal.Parse(dt.Rows[0].ItemArray[25].ToString()), bComponents = bool.Parse(dt.Rows[0].ItemArray[26].ToString()), iComponents = decimal.Parse(dt.Rows[0].ItemArray[27].ToString()), bOthers = bool.Parse(dt.Rows[0].ItemArray[28].ToString()), sOthers = dt.Rows[0].ItemArray[29].ToString(), iOthers = decimal.Parse(dt.Rows[0].ItemArray[30].ToString()), bPaint = bool.Parse(dt.Rows[0].ItemArray[31].ToString()), iPaint = decimal.Parse(dt.Rows[0].ItemArray[32].ToString()), bEmp = bool.Parse(dt.Rows[0].ItemArray[33].ToString()), iEmp = decimal.Parse(dt.Rows[0].ItemArray[34].ToString()), bBank = bool.Parse(dt.Rows[0].ItemArray[35].ToString()), iBank = decimal.Parse(dt.Rows[0].ItemArray[36].ToString()), bOthersC = bool.Parse(dt.Rows[0].ItemArray[37].ToString()), iOthersC = decimal.Parse(dt.Rows[0].ItemArray[38].ToString()), iPound = decimal.Parse(dt.Rows[0].ItemArray[39].ToString()), iDelta1 = int.Parse(dt.Rows[0].ItemArray[40].ToString()), iDelta2 = int.Parse(dt.Rows[0].ItemArray[41].ToString()), iCost = decimal.Parse(dt.Rows[0].ItemArray[42].ToString()), iMoldP = int.Parse(dt.Rows[0].ItemArray[43].ToString()), iMoldProtP = int.Parse(dt.Rows[0].ItemArray[44].ToString()), sObservations = dt.Rows[0].ItemArray[45].ToString(), iStart = int.Parse(dt.Rows[0].ItemArray[46].ToString()), iFR1 = decimal.Parse(dt.Rows[0].ItemArray[47].ToString()), iFR2 = decimal.Parse(dt.Rows[0].ItemArray[48].ToString()), iTotalInv = decimal.Parse(dt.Rows[0].ItemArray[49].ToString()), iTotalP = decimal.Parse(dt.Rows[0].ItemArray[50].ToString()) }; return(qct); }