private static void BatchDeleteEmployee() { try { BatchDeleteEmployee model = new Model.BatchDeleteEmployee(); List <string> list = new List <string>(); list.Add("landonzeng"); list.Add("landon"); model.useridlist = list; string param = model.ToJson(); Result Result = EmployeeBll.BatchDelete(param); if (Result != null) { if (Result.errcode == "0") { Console.Write("删除成功," + Result.errmsg); } else { Console.Write(Result.errmsg); } } else { Console.Write("无返回数据"); } } catch (Exception ex) { Console.Write(ex.Message); } }
public static void BatchDeleteEmployee(List <string> list) { LogHelper log = LogFactory.GetLogger("BatchDeleteEmployee"); try { BatchDeleteEmployee model = new Model.BatchDeleteEmployee(); model.useridlist = list; string param = model.ToJson(); Result Result = EmployeeBll.BatchDelete(param); if (Result != null) { if (Result.errcode == "0") { //Console.Write("删除成功," + Result.errmsg); } else { log.Error("\r\n EmployeeForDingTalkBll-BatchDeleteEmployee() " + Result.errmsg); //Console.Write(Result.errmsg); } } else { //Console.Write("无返回数据"); } } catch (Exception ex) { log.Error("\r\n EmployeeForDingTalkBll-BatchDeleteEmployee() " + ex); //Console.Write(ex.Message); } }