public AllocationModel ReturnAllocatonModel(string strWhere) { AllocationModel model = new AllocationModel(); DataTable allocationList = new DataTable(); allocationList = AllocationAction.GetAllocationList(strWhere); if (allocationList.Rows.Count > 0) { model.Aid = allocationList.Rows[0]["aid"].ToString(); model.Acode = allocationList.Rows[0]["acode"].ToString(); model.TCodea = allocationList.Rows[0]["tcodea"].ToString(); model.TCodeb = allocationList.Rows[0]["tcodeb"].ToString(); model.IsOutA = Convert.ToBoolean(allocationList.Rows[0]["isouta"].ToString()); model.IsInB = Convert.ToBoolean(allocationList.Rows[0]["isinb"].ToString()); model.Person = allocationList.Rows[0]["person"].ToString(); model.InTime = allocationList.Rows[0]["intime"].ToString(); model.Explain = allocationList.Rows[0]["explain"].ToString(); model.OutAllocationPerson = allocationList.Rows[0]["OutAllocationPerson"].ToString(); model.InAllocationPerson = allocationList.Rows[0]["InAllocationPerson"].ToString(); } return(model); }
public DataTable GetAllocationList(string strWhere) { return(AllocationAction.GetAllocationList(strWhere)); }