/// <summary> /// 更新客户信息(客户名称没有修改的情况下使用) /// </summary> /// <param name="CustomerName">客户名称</param> /// <param name="Contacter">联系人</param> /// <param name="TEL">联系电话</param> /// <param name="Address">联系地址</param> /// <param name="Remark">备注</param> /// <returns>返回 0 成功,-1 失败</returns> public int UpdateCustomer(string CustomerName, string Contacter, string TEL, string Address, string Remark) { using (GpsService.ServiceSoapClient service = new GpsService.ServiceSoapClient()) { DataSet dataSet = service.EMV_Get_Customer_Info(LoginKey, CustomerName); int CustomerID = 0; if (dataSet != null && dataSet.Tables[0].Rows.Count > 0) { CustomerID = Convert.ToInt32(dataSet.Tables[0].Rows[0][0]); } return(service.EMV_Update_Customer_Info(LoginKey, CustomerID, CustomerName, Contacter, TEL, Address, Remark)); } }
/// <summary> /// 获取客户信息 /// </summary> /// <param name="CustomerName">客户名称</param> /// <returns>返回CustomerID</returns> public int GetCustomer(string CustomerName) { using (GpsService.ServiceSoapClient service = new GpsService.ServiceSoapClient()) { DataSet dataSet = service.EMV_Get_Customer_Info(LoginKey, CustomerName); int CustomerID = 0; if (dataSet != null && dataSet.Tables[0].Rows.Count > 0) { CustomerID = Convert.ToInt32(dataSet.Tables[0].Rows[0][0]); } return(CustomerID); } }