/// <summary> /// 获取单据详情 /// </summary> /// <param name="docid">单据ID</param> /// <param name="clientid">客户端ID</param> /// <returns></returns> public static StorageDoc GetStorageDetail(string docid, string clientid) { DataSet ds = OrdersDAL.GetStorageDetail(docid, clientid); StorageDoc model = new StorageDoc(); if (ds.Tables.Contains("Doc") && ds.Tables["Doc"].Rows.Count > 0) { model.FillData(ds.Tables["Doc"].Rows[0]); model.CreateUser = OrganizationBusiness.GetUserByUserID(model.CreateUserID, clientid); model.StatusStr = GetDocStatusStr(model.DocType, model.Status); model.Details = new List <StorageDetail>(); foreach (DataRow item in ds.Tables["Details"].Rows) { StorageDetail details = new StorageDetail(); details.FillData(item); model.Details.Add(details); } } return(model); }