public static int InsertMoveTopograp(string spName, string Id_Lab, int CEast, int CNorth, int CElevant, int Ccode, string Code_Lab, string Detail_Id, string Point_Type, string Condition, string CodeTopo, string NameFile, DateTime DateEvent, string AditionalAct) { try { SqlParameter[] arr = GetParameters(13); arr[0].ParameterName = "@Id_Lab"; arr[0].Value = Id_Lab; arr[1].ParameterName = "@CEast"; arr[1].Value = CEast; arr[2].ParameterName = "@CNorth"; arr[2].Value = CNorth; arr[3].ParameterName = "@CElevant"; arr[3].Value = CElevant; arr[4].ParameterName = "@Ccode"; arr[4].Value = Ccode; arr[5].ParameterName = "@Code_Lab"; arr[5].Value = Code_Lab; arr[6].ParameterName = "@Detail_Id"; arr[6].Value = Detail_Id; arr[7].ParameterName = "@Point_Type"; arr[7].Value = Point_Type; arr[8].ParameterName = "@Condition"; arr[8].Value = Condition; arr[9].ParameterName = "@CodeTopo"; arr[9].Value = CodeTopo; arr[10].ParameterName = "@NameFile"; arr[10].Value = NameFile; arr[11].ParameterName = "@DateEvent"; arr[11].Value = DateEvent; arr[12].ParameterName = "@AditionalAct"; arr[12].Value = AditionalAct; return(oData.ExecuteNonQuery(spName, arr, System.Data.CommandType.StoredProcedure)); } catch (Exception Exc) { MessageBox.Show("Error saving LogProcess. " + Exc.Message, "Controlled message", MessageBoxButtons.OK, MessageBoxIcon.Error); return(-1); } }
public static int Register(DateTime Fecha, string Usuario, string IpLocal, string IpPublica, string SerialHDD, string Maquina, string Proceso, string Tipo) { try { SqlParameter[] ParamLog = GetParameters(8); ParamLog[0].ParameterName = "@date"; ParamLog[0].Value = Fecha; ParamLog[1].ParameterName = "@IdUser"; ParamLog[1].Value = Usuario; ParamLog[2].ParameterName = "@IpLocal"; ParamLog[2].Value = IpLocal; ParamLog[3].ParameterName = "@IpPublic"; ParamLog[3].Value = IpPublica; ParamLog[4].ParameterName = "@SerialHDD"; ParamLog[4].Value = SerialHDD; ParamLog[5].ParameterName = "@Machine"; ParamLog[5].Value = Maquina; ParamLog[6].ParameterName = "@Procces"; ParamLog[6].Value = Proceso; ParamLog[7].ParameterName = "@Type"; ParamLog[7].Value = Tipo; return(oData.ExecuteNonQuery("LogOperations", ParamLog, System.Data.CommandType.StoredProcedure)); } catch (Exception Exc) { MessageBox.Show("Error saving LogProcess. " + Exc.Message, "Controlled message", MessageBoxButtons.OK, MessageBoxIcon.Error); return(-1); } }