/// <summary> /// 同步宇通数据 /// </summary> /// <param name="o"></param> private void GetWebServHandler(object o) { Model.partReturn part = new Model.partReturn(); string strResult = DBHelper.WebServHandler("回收旧件-创建", EnumWebServFunName.UpPartReturnCreate, o); DataTable dt = DBHelper.GetTable("获取返厂单数据", "tb_maintain_oldpart_recycle", "*", strWhere, "", "order by return_id desc "); if (this.uiHandler != null) { this.Invoke(this.uiHandler, dt); } }
/// <summary> /// 同步宇通数据 /// </summary> /// <param name="o"></param> private void GetWebServHandler(object o) { try { Model.partReturn part = new Model.partReturn(); string strResult = DBHelper.WebServHandler("回收旧件-创建", EnumWebServFunName.UpPartReturnCreate, o); DataTable dt = DBHelper.GetTable("获取返厂单数据", "tb_maintain_oldpart_recycle", "*", strWhere, "", "order by return_id desc "); if (this.uiHandler != null) { this.Invoke(this.uiHandler, dt); } } catch (Exception ex) { HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex); } }
/// <summary> /// 旧件回收确认到宇通 /// </summary> /// <param name="oldBillNum">旧件回收单号</param> /// <param name="strReId">单据Id</param> /// <param name="strStartTime">回收周期开始时间</param> /// <param name="strEndTime">回收周期结束时间</param> private void ProcessModeToYT(string oldBillNum, string strReId, string strStartTime, string strEndTime) { try { partReturn model = new partReturn(); model.PartDetails = new partReturnPartDetail[1]; model.crm_old_bill_num = oldBillNum; model.info_status_yt = DBHelper.GetSingleValue("", "sys_dictionaries", "dic_id", "dic_code='oldpart_recycle_status_PCM_FIX_CALLBACK_ENTER'", ""); model.create_time_start = strStartTime; model.create_time_end = strEndTime; DataTable dmt = DBHelper.GetTable("宇通旧件返厂明细数据", "tb_maintain_oldpart_recycle_material_detail", "*", string.Format(" maintain_id='{0}'", strReId), "", ""); model.PartDetails = new partReturnPartDetail[dmt.Rows.Count]; if (dmt.Rows.Count > 0) { for (int i = 0; i < dmt.Rows.Count; i++) { DataRow dmr = dmt.Rows[i]; partReturnPartDetail detail = new partReturnPartDetail(); detail.parts_id = CommonCtrl.IsNullToString(dmr["parts_id"]); detail.service_no = CommonCtrl.IsNullToString(dmr["service_no"]); detail.car_parts_code = CommonCtrl.IsNullToString(dmr["parts_code"]); detail.parts_remark = CommonCtrl.IsNullToString(dmr["receive_explain"]); detail.change_num = CommonCtrl.IsNullToString(dmr["change_num"]); detail.send_num = CommonCtrl.IsNullToString(dmr["send_num"]); detail.process_mode = CommonCtrl.IsNullToString(dmr["process_mode"]); detail.remark = ""; model.PartDetails[i] = detail; } } DBHelper.WebServHandler("回收旧件-更新", EnumWebServFunName.UpPartRetureUpdate, model); } catch (Exception ee) { } }
private void ProcessModeToYT() { try { partReturn model = new partReturn(); model.PartDetails = new partReturnPartDetail[intDetailCount]; model.crm_old_bill_num = laboldpart_receipts_no.Text; model.info_status_yt = info_status_yt; model.create_time_start = dtpSTime.Value.ToString("yyyy-MM-dd"); model.create_time_end = dtpETime.Value.ToString("yyyy-MM-dd"); for (int i = 0; i < dgvMaterials.Rows.Count; i++) { string strPNO = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["service_no"].Value); string strPCode = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["parts_code"].Value); if (strPCode.Length > 0) { partReturnPartDetail detail = new partReturnPartDetail(); detail.parts_id = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["parts_id"].Value); detail.service_no = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["service_no"].Value); detail.car_parts_code = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["parts_code"].Value); detail.parts_remark = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["receive_explain"].Value); detail.change_num = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["change_num"].Value); detail.send_num = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["send_num"].Value); detail.process_mode = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["process_mode"].Value); detail.remark = ""; model.PartDetails[i] = detail; } } DBHelper.WebServHandler("回收旧件-更新", EnumWebServFunName.UpPartRetureUpdate, model); } catch (Exception ex) { HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex); } }
/// <summary> /// 旧件回收确认到宇通 /// </summary> private void ProcessModeToYT() { partReturn model = new partReturn(); model.PartDetails = new partReturnPartDetail[intDetailCount]; model.crm_old_bill_num = laboldpart_receipts_no.Text; model.info_status_yt = DBHelper.GetSingleValue("", "sys_dictionaries", "dic_id", "dic_code='oldpart_recycle_status_PCM_FIX_CALLBACK_ENTER'", ""); ; model.create_time_start = strHSTime; model.create_time_end = strHETime; for (int i = 0; i < dgvMaterials.Rows.Count; i++) { string strPNO = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["service_no"].Value); string strPCode = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["parts_code"].Value); if (strPCode.Length > 0) { partReturnPartDetail detail = new partReturnPartDetail(); detail.parts_id = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["parts_id"].Value); detail.service_no = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["service_no"].Value); detail.car_parts_code = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["parts_code"].Value); detail.parts_remark = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["receive_explain"].Value); detail.change_num = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["change_num"].Value); detail.send_num = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["send_num"].Value); detail.process_mode = CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["process_mode"].Value); detail.remark = ""; model.PartDetails[i] = detail; } } DBHelper.WebServHandler("回收旧件-更新", EnumWebServFunName.UpPartRetureUpdate, model); }
/// <summary> /// 同步宇通数据 /// </summary> /// <param name="o"></param> private void GetWebServHandler(object o) { Model.partReturn part = new Model.partReturn(); string strResult = DBHelper.WebServHandler("回收旧件-创建", EnumWebServFunName.UpPartReturnCreate,o); DataTable dt = DBHelper.GetTable("获取返厂单数据", "tb_maintain_oldpart_recycle", "*", strWhere, "", "order by return_id desc "); if (this.uiHandler != null) { this.Invoke(this.uiHandler, dt); } }