Exemplo n.º 1
0
        private void RptBind()
        {
            BLL.Consumption consumptionBll = new BLL.Consumption();
            DataSet consumptionDS = consumptionBll.GetList(0, "TransportOrderId = " + id + "", "Money");

            this.rptList.DataSource = consumptionDS;
            this.rptList.DataBind();
        }
Exemplo n.º 2
0
        private void RptBind()
        {
            BLL.Consumption consumptionBll = new BLL.Consumption();
            DataSet         consumptionDS  = consumptionBll.GetList(0, "TransportOrderId = " + id + "", "Money");

            this.rptList.DataSource = consumptionDS;
            this.rptList.DataBind();
        }
Exemplo n.º 3
0
        protected decimal GetTotalConsumption(string transportOrderId)
        {
            decimal totalCost = 0.00M;

            BLL.Consumption consumptionBll = new BLL.Consumption();
            DataSet         consumptionDS  = consumptionBll.GetList(0, "TransportOrderId = " + transportOrderId + "", "Money");

            if (consumptionDS != null && consumptionDS.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in consumptionDS.Tables[0].Rows)
                {
                    totalCost += Utils.StrToDecimal(dr["Money"].ToString(), 0.00M);
                }
            }

            return(totalCost);
        }
Exemplo n.º 4
0
        protected string GetTransportOrderItems(string transportOrderId, string advance, string factRepayment, string carriage)
        {
            decimal totalMoney = 0.00M;

            BLL.TransportOrderItem itemBll = new BLL.TransportOrderItem();
            DataSet ds = itemBll.GetList(0, "TransportOrderId = " + transportOrderId + "", "TotalPrice");

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    totalMoney += Utils.StrToDecimal(dr["TotalPrice"].ToString(), 0.00M);
                }
            }

            decimal totalCost = 0.00M;

            BLL.Consumption consumptionBll = new BLL.Consumption();
            DataSet         consumptionDS  = consumptionBll.GetList(0, "TransportOrderId = " + transportOrderId + "", "Money");

            if (ds != null && consumptionDS.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in consumptionDS.Tables[0].Rows)
                {
                    totalCost += Utils.StrToDecimal(dr["Money"].ToString(), 0.00M);
                }
            }

            decimal gain = totalMoney - Utils.StrToDecimal(advance, 0.00M) + Utils.StrToDecimal(factRepayment, 0.00M) - Utils.StrToDecimal(carriage, 0.00M) - totalCost;

            string html = string.Format("<td align=\"center\">¥{0}</td><td align=\"center\">¥{1}</td><td align=\"center\">¥{2}</td><td align=\"center\">¥{3}</td><td align=\"center\">¥{4}</td><td align=\"center\">¥{5}</td>",
                                        string.Format("{0:N2}", advance),
                                        string.Format("{0:N2}", factRepayment),
                                        string.Format("{0:N2}", carriage),
                                        string.Format("{0:N2}", totalMoney),
                                        string.Format("<a href=\"javascript:void(0);\" onclick=\"showCost(" + transportOrderId + ");\">{0:N2}</a>", totalCost),
                                        string.Format("{0:N2}", gain));

            return(html);
        }
Exemplo n.º 5
0
        protected string GetTransportOrderItems(string transportOrderId, string advance, string factRepayment, string carriage)
        {
            decimal totalMoney = 0.00M;
            BLL.TransportOrderItem itemBll = new BLL.TransportOrderItem();
            DataSet ds = itemBll.GetList(0, "TransportOrderId = " + transportOrderId + "", "TotalPrice");
            if (ds != null && ds.Tables[0].Rows.Count  > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    totalMoney += Utils.StrToDecimal(dr["TotalPrice"].ToString(), 0.00M);
                }
            }

            decimal totalCost = 0.00M;
            BLL.Consumption consumptionBll = new BLL.Consumption();
            DataSet consumptionDS = consumptionBll.GetList(0, "TransportOrderId = " + transportOrderId + "", "Money");
            if (ds != null && consumptionDS.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in consumptionDS.Tables[0].Rows)
                {
                    totalCost += Utils.StrToDecimal(dr["Money"].ToString(), 0.00M);
                }
            }

            decimal gain = totalMoney - Utils.StrToDecimal(advance, 0.00M) + Utils.StrToDecimal(factRepayment, 0.00M) - Utils.StrToDecimal(carriage, 0.00M) - totalCost;

            string html = string.Format("<td align=\"center\">¥{0}</td><td align=\"center\">¥{1}</td><td align=\"center\">¥{2}</td><td align=\"center\">¥{3}</td><td align=\"center\">¥{4}</td><td align=\"center\">¥{5}</td>",
                string.Format("{0:N2}", advance),
                string.Format("{0:N2}", factRepayment),
                string.Format("{0:N2}", carriage),
                string.Format("{0:N2}", totalMoney),
                string.Format("<a href=\"javascript:void(0);\" onclick=\"showCost(" + transportOrderId + ");\">{0:N2}</a>", totalCost),
                string.Format("{0:N2}", gain));

            return html;
        }
Exemplo n.º 6
0
        protected decimal GetTotalConsumption(string transportOrderId)
        {
            decimal totalCost = 0.00M;
            BLL.Consumption consumptionBll = new BLL.Consumption();
            DataSet consumptionDS = consumptionBll.GetList(0, "TransportOrderId = " + transportOrderId + "", "Money");
            if (consumptionDS != null && consumptionDS.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in consumptionDS.Tables[0].Rows)
                {
                    totalCost += Utils.StrToDecimal(dr["Money"].ToString(), 0.00M);
                }
            }

            return totalCost;
        }