TaskActual - List<string>, contains list of values for JobCode7.

 

using(MIMSConnection conn = new MIMSConnection(Credentials["Host"],Credentials["User"],Credentials["Password"],Credentials["District"],Credentials["Position"])){
	WorkOrderManager wo = new WorkOrderManager(conn);
	EquipmentManager equip = new EquipmentManager(conn);
	RefCodesManager rc = new RefCodesManager(conn);
	TableManager tbl = new TableManager(conn);
	foreach(string taskName in TaskActual){
		Dictionary<string,string> paramDict = new Dictionary<string,string>();
		paramDict["SearchMethod"] = MIMSConst.WorkOrder.SearchMethod.StartFrom;
		paramDict["WorkOrder"] = "0";
		paramDict["JobCode7"] = taskName;
		List<WorkOrderInfo> woList;
		try{
			woList = wo.Retrieve(paramDict);
		}catch(MIMSException.WorkOrder.UnknownWorkCodeException){
			Do something
		}
		while(true){
			List<WorkOrderInfo> woListPortion = wo.Retrieve();
			if(woListPortion.Count == 0) break;
			woList.AddRange(woListPortion);
		}
	}
}

 

Last edited Oct 1, 2010 at 12:23 PM by Relexey, version 2

Comments

No comments yet.