예제 #1
0
        public ActionResult Index()
        {
            AtlData2Model<Plan> s = new AtlData2Model<Plan>();
            List<Plan> planlist = new List<Plan>();

            object o = System.Configuration.ConfigurationManager.GetSection("log4net");
            log4net.Config.XmlConfigurator.Configure(o as System.Xml.XmlElement);
            log4net.ILog logger = log4net.LogManager.GetLogger("WebLogger");

            logger.Info("读取计划");

            string condition = "replace(ep.etd1,'后告','00:00:00')>='1900-01-01 00:00:00' and replace(ep.etd1,'后告','00:00:00')<='"+DateTime.Now.ToString()+" 23:59:59' and  loc.loc_name not in ( '改航', '离港') ";
            ATLDATALib.IDBDataAtl rs = SM.RPC.ProcessControl.GetShipList1("condition", condition, "type", "five");

            logger.Info("转换 atldata2model");

            if (rs.IsOK()){
                planlist = s.ConvertList(rs);
            }else {
                ViewBag.ErrorInfo = rs.GetErrorinfo();
            }

            //planlist = planlist.Take(10).ToList();
            logger.Info("返回");
            return View(planlist);
        }
예제 #2
0
        //[UserAuthorize]
        public ActionResult Index()
        {
            //新闻
            AtlData2Model<News> a2m = new AtlData2Model<News>();
            List<News> newslist = new List<News>();

            ATLDATALib.IDBDataAtl rs = SM.RPC.ShipBoxPriceControl.GetNewsList("ntype", "");
            if (rs.IsOK()) {
                newslist = a2m.ConvertList(rs);
            } else {
                ViewBag.ErrorInfo = rs.GetErrorinfo();
            }
            newslist = newslist.Take(10).ToList();
            ViewBag.newslist = newslist;

            //客户列表
            AtlData2Model<Customer> c_a2m = new AtlData2Model<Customer>();
            List<Customer> customerlist = new List<Customer>();
            ATLDATALib.IDBDataAtl c_rs = SM.RPC.ShipBoxPriceControl.GetShipMemo("ntype", "");
            if (rs.IsOK()) {
                customerlist = c_a2m.ConvertList(c_rs);
            } else {
                ViewBag.ErrorInfo = rs.GetErrorinfo();
            }
            ViewBag.customerlist = customerlist;

            return View();
        }
예제 #3
0
 //
 // GET: /News/
 public ActionResult Index()
 {
     AtlData2Model<News> a2m = new AtlData2Model<News>();
     List<News> newslist = new List<News>();
     ATLDATALib.IDBDataAtl rs = SM.RPC.ShipBoxPriceControl.GetNewsList("ntype", "");
     if (rs.IsOK()){
         newslist = a2m.ConvertList(rs);
     }else{
         ViewBag.ErrorInfo = rs.GetErrorinfo();
     }
     return View(newslist);
 }
예제 #4
0
 //我的订舱
 public ActionResult Orders(int? id)
 {
     if (id == null) id = 1;
     AtlData2Model<UserOrder> a2m = new AtlData2Model<UserOrder>();
     List<UserOrder> orderlist = new List<UserOrder>();
     ATLDATALib.IDBDataAtl rs = SM.UserRPC.ShipBoxPriceControl.GetSailBoxList(
         "emp_id", Session["user_id"],
         "type", "2",
         "pagnum", id,
         "pagcount", 10
     );
     string pageCount = "0";
     if (rs.IsOK()) {
         orderlist = a2m.ConvertList(rs);
         pageCount = orderlist.FirstOrDefault().totalpag;
     } else {
         ViewBag.ErrorInfo = rs.GetErrorinfo();
     }
     ViewBag.pageCount = pageCount;
     ViewBag.page = id;
     return View(orderlist);
 }
예제 #5
0
        public ActionResult Five(string id)
        {
            GetCustome();
            AtlData2Model<Plan> a2m = new AtlData2Model<Plan>();
            List<Plan> planlist = new List<Plan>();

            string etd_start = "1901-01-01";
            string etd_end = DateTime.Now.ToString();

            String condition = "replace(ep.etd1,'后告','00:00:00')>='" + etd_start + " 00:00:00' and replace(ep.etd1,'后告','00:00:00')<='" + etd_end + " 23:59:59' and  loc.loc_name not in ( '改航') and give_trust = '" + Gcustomer.customer_id + "'";

            ATLDATALib.IDBDataAtl rs = SM.UserRPC.ProcessControl.GetShipList1("condition", condition, "type", "five");

            if (rs.IsOK()) {
                planlist = a2m.ConvertList(rs);
            } else {
                ViewBag.ErrorInfo = rs.GetErrorinfo();
            }

            //planlist = planlist.Take(10).ToList();

            return View(planlist);
        }