/// <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="DispatchCode">调度单编号</param> /// <param name="VehicleNum">车牌</param> /// <param name="TaskID">任务单ID</param> /// <param name="dFactAmount">运输量</param> /// <param name="PlanLeaveTime">计划离场时间</param> /// <param name="Driver">驾驶员</param> /// <param name="ShiftType">班次,如:白班,晚班</param> /// <param name="Remark">备注</param> /// <returns>返回 0 成功,-1 失败</returns> public int UpdateDispatch(string DispatchCode, string VehicleNum, string TaskID, double dFactAmount, string PlanLeaveTime, string Driver, int ShiftType, string Remark) { using (GpsService.ServiceSoapClient service = new GpsService.ServiceSoapClient()) { DataSet dataSet = service.EMV_Get_Dispatch_Info(LoginKey, DispatchCode); int DispatchID = 0; if (dataSet != null && dataSet.Tables[0].Rows.Count > 0) { DispatchID = Convert.ToInt32(dataSet.Tables[0].Rows[0][0]); } return(service.EMV_Update_Dispatch_Info(LoginKey, DispatchID, DispatchCode, VehicleNum, TaskID, dFactAmount, PlanLeaveTime, Driver, ShiftType, Remark)); } }
/// <summary> /// 获取调度单信息 /// </summary> /// <param name="DispatchCode">调度单编号</param> /// <returns>返回调度单ID</returns> public int GetDispatch(string DispatchCode) { using (GpsService.ServiceSoapClient service = new GpsService.ServiceSoapClient()) { DataSet dataSet = service.EMV_Get_Dispatch_Info(LoginKey, DispatchCode); int DispatchID = 0; if (dataSet != null && dataSet.Tables[0].Rows.Count > 0) { DispatchID = Convert.ToInt32(dataSet.Tables[0].Rows[0][0]); } return(DispatchID); } }
/// <summary> /// 获取任务单信息 /// </summary> /// <param name="TaskCode">任务单编号</param> /// <returns>返回任务单ID</returns> public int GetTask(string TaskCode) { using (GpsService.ServiceSoapClient service = new GpsService.ServiceSoapClient()) { DataSet dataSet = service.EMV_Get_Task_Info(LoginKey, TaskCode); int TaskID = 0; if (dataSet != null && dataSet.Tables[0].Rows.Count > 0) { TaskID = Convert.ToInt32(dataSet.Tables[0].Rows[0][0]); } return(TaskID); } }
/// <summary> /// 获取工地信息 /// </summary> /// <param name="CSName">工地名称</param> /// <returns>返回工地ID</returns> public int GetConstructionSite(string CSName) { using (GpsService.ServiceSoapClient service = new GpsService.ServiceSoapClient()) { DataSet dataSet = service.EMV_Get_Construction_Site_Info(LoginKey, CSName); int CSID = 0; if (dataSet != null && dataSet.Tables[0].Rows.Count > 0) { CSID = Convert.ToInt32(dataSet.Tables[0].Rows[0][0]); } return(CSID); } }
/// <summary> /// 更新工地信息(工地名称没有修改的情况下使用) /// </summary> /// <param name="CSName">工地名称</param> /// <param name="Address">工地地址</param> /// <param name="CustomerID">所属客户ID</param> /// <param name="Contactor">联系人</param> /// <param name="TEL">联系电话</param> /// <param name="Remark">备注</param> /// <returns>返回 0 成功,-1 失败</returns> public int UpdateConstructionSite(string CSName, string Address, int CustomerID, string Contactor, string TEL, string Remark) { using (GpsService.ServiceSoapClient service = new GpsService.ServiceSoapClient()) { DataSet dataSet = service.EMV_Get_Construction_Site_Info(LoginKey, CSName); int CSID = 0; if (dataSet != null && dataSet.Tables[0].Rows.Count > 0) { CSID = Convert.ToInt32(dataSet.Tables[0].Rows[0][0]); } return(service.EMV_Update_Construction_Site_Info(LoginKey, CSID, CSName, Address, CustomerID, Contactor, TEL, Remark, 0, 0, 0, 0)); } }
/// <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); } }
/// <summary> /// 更新任务单信息 /// </summary> /// <param name="TaskCode">任务单编号</param> /// <param name="CSID">工地ID</param> /// <param name="PartName">工程部位</param> /// <param name="BetonGrade">砼强度</param> /// <param name="FeedingWay">输送方式,如:0=直送 1=泵送</param> /// <param name="PlanAmount">计划方量</param> /// <param name="PlanTime">计划到场时间</param> /// <param name="iUnloadMinutes">卸料时限(单位:分钟)</param> /// <param name="iReturnMinutes">卸料时限(单位:分钟)</param> /// <param name="ScoutMan">跟单员</param> /// <param name="iStatus">任务状态(0=未完成 1=已完成)</param> /// <param name="Remark">备注</param> /// <returns>返回 0 成功,-1 失败</returns> public int UpdateTask(string TaskCode, int CSID, string PartName, string BetonGrade, int FeedingWay, int PlanAmount, string PlanTime, int iUnloadMinutes, int iReturnMinutes, string ScoutMan, int iStatus, string Remark) { using (GpsService.ServiceSoapClient service = new GpsService.ServiceSoapClient()) { DataSet dataSet = service.EMV_Get_ProjectPart(LoginKey); int PartID = 2901; if (dataSet != null && dataSet.Tables[0].Rows.Count > 0) { for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++) { if (PartName == dataSet.Tables[0].Rows[i][1].ToString()) { PartID = Convert.ToInt32(dataSet.Tables[0].Rows[i][0]); break; } } } dataSet = service.EMV_Get_BetonGrade(LoginKey); int BetonGradeID = 3051; if (dataSet != null && dataSet.Tables[0].Rows.Count > 0) { for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++) { if (BetonGrade == dataSet.Tables[0].Rows[i][1].ToString()) { BetonGradeID = Convert.ToInt32(dataSet.Tables[0].Rows[i][0]); break; } } } dataSet = service.EMV_Get_Task_Info(LoginKey, TaskCode); int TaskID = 0; if (dataSet != null && dataSet.Tables[0].Rows.Count > 0) { TaskID = Convert.ToInt32(dataSet.Tables[0].Rows[0][0]); } return(service.EMV_Update_Task_Info(LoginKey, TaskID, TaskCode, CSID, PartID, BetonGradeID, FeedingWay, PlanAmount, PlanTime, iUnloadMinutes, iReturnMinutes, ScoutMan, iStatus, Remark)); } }