private void ShowInfo(int _id) { BLL.TransportOrder bll = new BLL.TransportOrder(); Model.TransportOrder model = bll.GetModel(_id); txtFactArriveDate.Text = model.FactArriveDate.Value.ToString("yyyy-MM-dd"); txtFactBackTime.Text = model.BackTime.Value.ToString("yyyy-MM-dd"); txtFactDispatchCount.Text = model.FactDispatchCount.ToString(); txtFactWeight.Text = model.FactWeight.ToString(); txtReceivedWeight.Text = model.FactWeight.ToString(); txtUnloadingWeight.Text = model.FactWeight.ToString(); txtFactCarriage.Text = model.FactCarriage.ToString(); txtRepayment.Text = model.Advance.ToString(); txtFactRepayment.Text = "0.00"; BLL.Order itemBll = new BLL.Order(); DataTable dt = itemBll.GetPrintList(0, " and A.TransportOrderId = " + model.Id + "", " order by A.Id desc").Tables[0]; foreach (DataRow dr in dt.Rows) { transportOrderItems += "<tr data-value=\"" + dr["Id"].ToString() + "\">"; transportOrderItems += "<td width=\"5%\"><input type=\"hidden\" name=\"OrderId\" value=\"" + dr["Id"].ToString() + "\"/></td>"; transportOrderItems += "<td align=\"left\">" + dr["BillNumber"].ToString() + "</td>"; transportOrderItems += "<td width=\"13%\">" + dr["Shipper"].ToString() + "</td>"; transportOrderItems += "<td width=\"13%\">" + dr["Receiver"].ToString() + "</td>"; transportOrderItems += "<td width=\"12%\">" + dr["GoodsName"].ToString() + "</td>"; transportOrderItems += "<td width=\"8%\">¥<input type=\"text\" name=\"UnitPrice\" class=\"input small\" value=\"" + dr["UnitPrice"].ToString() + "\" style='width:50px'/></td>"; transportOrderItems += "<td width=\"8%\"><input type=\"text\" name=\"Weight\" class=\"input small\" value=\"" + dr["Weight"].ToString() + "\" style='width:50px'/></td>"; transportOrderItems += "<td width=\"8%\">¥<input type=\"text\" name=\"Freight\" value=\"" + dr["Freight"].ToString() + "\" style='width:50px'/></td>"; transportOrderItems += "<td width=\"8%\">¥<input type=\"text\" name=\"PaidFreight\" value=\"" + dr["PaidFreight"].ToString() + "\" style='width:50px'/></td>"; transportOrderItems += "<td width=\"8%\">¥<input type=\"text\" name=\"UnpaidFreight\" value=\"" + dr["UnpaidFreight"].ToString() + "\" style='width:50px'/></td>"; transportOrderItems += "</tr>"; } BLL.CostItem costItemBll = new BLL.CostItem(); DataTable costItemDT = costItemBll.GetAllList().Tables[0]; foreach (DataRow dr in costItemDT.Rows) { consumptions += "<tr data-value=\"" + dr["Id"].ToString() + "\">"; consumptions += "<td width=\"5%\"><input type=\"hidden\" name=\"costItemName\" value=\"" + dr["Name"].ToString() + "\"/></td>"; consumptions += "<td width=\"5%\">" + dr["Name"].ToString() + "</td>"; consumptions += "<td width=\"50%\">¥<input type=\"text\" name=\"money\" class=\"input small\" value=\"0.00\"/></td>"; consumptions += "</tr>"; } }
private void ShowInfo(int _id) { BLL.TransportOrder bll = new BLL.TransportOrder(); Model.TransportOrder model = bll.GetModel(_id); labCode.Text = model.Code; labFactDispatchTime.Text = model.FactDispatchTime.ToString("yyyy-MM-dd"); Model.Driver driver = new BLL.Driver().GetModel(model.DriverId); if (driver != null) { labDriver.Text = driver.RealName; labLinkTel.Text = driver.LinkTel; labCarNumber.Text = driver.CarNumber; } labPayee.Text = model.Payee; labAdvance.Text = model.Advance.ToString(); BLL.Order itemBll = new BLL.Order(); DataTable dt = itemBll.GetPrintList(0, " and A.TransportOrderId = " + model.Id + "", " order by A.Id desc").Tables[0]; foreach (DataRow dr in dt.Rows) { transportOrderItems += "<tr data-value=\"" + dr["Id"].ToString() + "\">"; transportOrderItems += "<td></td>"; transportOrderItems += "<td align=\"left\">" + dr["Code"].ToString() + "</td>"; transportOrderItems += "<td width=\"10%\">" + dr["BillNumber"].ToString() + "</td>"; transportOrderItems += "<td width=\"10%\">" + dr["WeighbridgeNumber"].ToString() + "</td>"; transportOrderItems += "<td width=\"10%\">" + dr["Shipper"].ToString() + "</td>"; transportOrderItems += "<td width=\"10%\">" + dr["Receiver"].ToString() + "</td>"; transportOrderItems += "<td width=\"10%\">" + dr["GoodsName"].ToString() + "</td>"; transportOrderItems += "<td width=\"6%\">" + dr["Quantity"].ToString() + "</td>"; transportOrderItems += "<td width=\"5%\">" + dr["Weight"].ToString() + "</td>"; transportOrderItems += "<td width=\"5%\">¥" + string.Format("{0:N2}", dr["UnitPrice"].ToString()) + "</td>"; transportOrderItems += "<td width=\"5%\">¥" + string.Format("{0:N2}", dr["Freight"].ToString()) + "</td>"; transportOrderItems += "<td width=\"5%\">¥" + string.Format("{0:N2}", dr["HandlingCharge"].ToString()) + "</td>"; transportOrderItems += "</tr>"; } }
private void ShowInfo(int _id) { BLL.TransportOrder bll = new BLL.TransportOrder(); Model.TransportOrder model = bll.GetModel(_id); labCode.Text = model.Code; labFactDispatchTime.Text = model.FactDispatchTime.ToString("yyyy-MM-dd"); Model.Driver driver = new BLL.Driver().GetModel(model.DriverId); if (driver != null) { labDriver.Text = driver.RealName; labLinkTel.Text = driver.LinkTel; labCarNumber.Text = driver.CarNumber; } labPayee.Text = model.Payee; labAdvance.Text = model.Advance.ToString(); BLL.Order itemBll = new BLL.Order(); DataTable dt = itemBll.GetPrintList(0, " and A.TransportOrderId = " + model.Id + "", " order by A.Id desc").Tables[0]; foreach (DataRow dr in dt.Rows) { transportOrderItems += "<tr data-value=\"" + dr["Id"].ToString() + "\">"; transportOrderItems += "<td></td>"; transportOrderItems += "<td align=\"left\">" + dr["Code"].ToString() + "</td>"; transportOrderItems += "<td width=\"10%\">" + dr["BillNumber"].ToString() + "</td>"; transportOrderItems += "<td width=\"10%\">" + dr["WeighbridgeNumber"].ToString() + "</td>"; transportOrderItems += "<td width=\"10%\">" + dr["Shipper"].ToString() + "</td>"; transportOrderItems += "<td width=\"10%\">" + dr["Receiver"].ToString() + "</td>"; transportOrderItems += "<td width=\"10%\">" + dr["GoodsName"].ToString() + "</td>"; transportOrderItems += "<td width=\"6%\">" + dr["Quantity"].ToString() + "</td>"; transportOrderItems += "<td width=\"5%\">" + dr["Weight"].ToString() + "</td>"; transportOrderItems += "<td width=\"5%\">¥" +string.Format("{0:N2}", dr["UnitPrice"].ToString())+ "</td>"; transportOrderItems += "<td width=\"5%\">¥" + string.Format("{0:N2}", dr["Freight"].ToString()) + "</td>"; transportOrderItems += "<td width=\"5%\">¥" + string.Format("{0:N2}", dr["HandlingCharge"].ToString()) + "</td>"; transportOrderItems += "</tr>"; } }