public void CopyFrom(MeterDisassemblyTaskBase src) { if (src == null) { return; } TaskID = src.TaskID; TechnicianID = src.TechnicianID; CustomerID = src.CustomerID; OperatorID = src.OperatorID; TaskType = src.TaskType; TaskState = src.TaskState; TaskResult = src.TaskResult; Feedback = src.Feedback; MeterStatue = src.MeterStatue; TotalComsumedValue = src.TotalComsumedValue; RemainValue = src.RemainValue; CreatTime = src.CreatTime; FinishTime = src.FinishTime; OldMeterTotalDialReading = src.OldMeterTotalDialReading; }
/// <summary> /// 获取文件名 /// 根据任务类型和对应的参数 /// </summary> /// <param name="type"></param> /// <param name="refundtaskinfo"></param> /// <param name="resultinfo"></param> /// <param name="isResultFile">true-结果文件名,false-任务文件名</param> /// <returns></returns> private static String GetFileName(eTaskType type, RefundTask refundtaskinfo, MeterDisassemblyTaskBase resultinfo, Boolean isResultFile = true) { List <String> namelist = new List <string> { }; String str = String.Empty; //先根据任务类型 switch (type) { case eTaskType.CloseCustomer: str = (isResultFile) ? Const_TaskFileResultName_CancelAccountResult : Const_TaskFileName_CancelAccountTask; break; case eTaskType.Refund: str = (isResultFile) ? Const_TaskFileResultName_RefundResult : Const_TaskFileName_RefundTask; break; case eTaskType.ReplaceMeter: str = (isResultFile) ? Const_TaskFileResultName_ReplaceMeterResult : Const_TaskFileName_ReplaceMeterTask; break; default: return(null); } namelist.Add(str); if (type == eTaskType.Refund) { if (refundtaskinfo == null) { return(null); } //获取 TechnicianID namelist.Add(refundtaskinfo.TechnicianID.ToString()); //获取 TaskID namelist.Add(refundtaskinfo.TaskID.ToString()); } else { if (resultinfo == null) { return(null); } //获取 TechnicianID namelist.Add(resultinfo.TechnicianID.ToString()); //获取 TaskID namelist.Add(resultinfo.TaskID.ToString()); } String reslutfilename = DataFormatProcessor.ListToString(namelist, "_"); reslutfilename = reslutfilename + ".bin"; return(reslutfilename); }