/// <summary> /// 获取统计信息 /// </summary> public void getBasic() { string strwhere = Session["strWhere"].ToString(); saletaskId = saletaskbll.getSaleTaskid(strwhere); DataSet ds = saletaskbll.getSaleTaskStatistics(saletaskId); if (ds != null) { string number = ds.Tables[0].Rows[0]["number"].ToString(); if (number == "" || number == null) { allnumber = 0; alltotalprice = 0; allreadprice = 0; } else { allnumber = int.Parse(ds.Tables[0].Rows[0]["number"].ToString()); alltotalprice = double.Parse(ds.Tables[0].Rows[0]["totalPrice"].ToString()); allreadprice = double.Parse(ds.Tables[0].Rows[0]["realPrice"].ToString()); } } //统计种数 allkinds = saletaskbll.getkindsBySaleTaskId(saletaskId); DataSet userds = saletaskbll.getcustomerName(saletaskId); if (userds != null) { //stasupplier, staregionName, ; userName = userds.Tables[0].Rows[0]["userName"].ToString(); stacustomerName = userds.Tables[0].Rows[0]["customerName"].ToString(); //startTime = userds.Tables[0].Rows[0]["startTime"].ToString(); startTime = Convert.ToDateTime(userds.Tables[0].Rows[0]["startTime"].ToString()).ToString("yyyy年MM月dd日"); finishTime = userds.Tables[0].Rows[0]["finishTime"].ToString(); regionName = userds.Tables[0].Rows[0]["regionName"].ToString(); if (finishTime == "" || finishTime == null) { finishTime = "此销售任务还未结束"; } else { finishTime = Convert.ToDateTime(finishTime).ToString("yyyy年MM月dd日"); } } }