/// <summary> /// /// </summary> /// <returns>int</returns> public static int usp_ServiceInstance_Insert_TCPIP(DI.usp_ServiceInstance_Insert_TCPIPParameters p) { SqlCommand cmd = DC.NewCmd_usp_ServiceInstance_Insert_TCPIP(p); if (p.CheckIsServiceIDChanged()) { object o = p.ServiceID; if (o == null) { cmd.Parameters["ServiceID"].Value = DBNull.Value; } else { cmd.Parameters["ServiceID"].Value = o; } } if (p.CheckIsCreateTimeChanged()) { object o = p.CreateTime; if (o == null) { cmd.Parameters["CreateTime"].Value = DBNull.Value; } else { cmd.Parameters["CreateTime"].Value = o; } } if (p.CheckIsDescriptionChanged()) { object o = p.Description; if (o == null) { cmd.Parameters["Description"].Value = DBNull.Value; } else { cmd.Parameters["Description"].Value = o; } } SQLHelper.ExecuteNonQuery(cmd); string s = cmd.Parameters["RETURN_VALUE"].Value.ToString(); if (string.IsNullOrEmpty(s)) { p.SetReturnValue(0); return(0); } else { p.SetReturnValue(int.Parse(s)); return(p._ReturnValue); } }
/// <summary> /// /// </summary> /// <returns>int</returns> public static int usp_ServiceInstance_Insert_TCPIP(int?ServiceID, System.DateTime?CreateTime, string Description) { SqlCommand cmd = DC.NewCmd_usp_ServiceInstance_Insert_TCPIP(); if (ServiceID == null) { cmd.Parameters["ServiceID"].Value = DBNull.Value; } else { cmd.Parameters["ServiceID"].Value = ServiceID; } if (CreateTime == null) { cmd.Parameters["CreateTime"].Value = DBNull.Value; } else { cmd.Parameters["CreateTime"].Value = CreateTime; } if (Description == null) { cmd.Parameters["Description"].Value = DBNull.Value; } else { cmd.Parameters["Description"].Value = Description; } SQLHelper.ExecuteNonQuery(cmd); string s = cmd.Parameters["RETURN_VALUE"].Value.ToString(); if (string.IsNullOrEmpty(s)) { return(0); } return(int.Parse(s)); }