public string fnDeletes(Client client, string sIP, string sId) { string sSql = " UPDATE [dbo].[MNDTclient] " + " SET [status] = 'D' " + " WHERE [client_id] IN (" + client.client_id + ")"; ClientTran clientTran = new ClientTran(); clientTran.ClientId(client.client_id) .IP(sIP) .Status("D") .CreateId(sId); sSql += fnInsertsSql(clientTran); return(PublicApi.fnExecuteSQL(sSql, "MNDT")); }
public string fnUpdate(Client client, string sIP, string sId) { string sSql = " UPDATE [dbo].[MNDTclient] " + " SET [password] = '" + client.encrypt_password + "' " + " ,[name] = '" + client.name + "' " + " ,[email] = '" + client.email + "' " + " ,[address] = '" + client.address + "' " + " ,[phone] = '" + client.phone + "' " + " ,[tel] = '" + client.tel + "' " + " ,[description] = '" + client.description + "' " + " ,[status] = '" + client.status + "' " + " WHERE [client_id] = '" + client.client_id + "' "; ClientTran clientTran = new ClientTran(); clientTran.ClientId(client.client_id) .IP(sIP) .Status("M") .CreateId(sId); sSql += fnInsertSql(clientTran); return(PublicApi.fnExecuteSQL(sSql, "MNDT")); }