Exemplo n.º 1
0
 public ActionResult GetDataRule()
 {
     string id = Request["ids"];
     string dataVersion = Request["dv"];
     CoreLib.SystemData sysData = new SystemData(id, dataVersion);
     DataTable dataTable = sysData.NodeTable("Rule");
     return Json(CoreLib.Common.GetList<CoreLib.Rule>(dataTable), JsonRequestBehavior.AllowGet);
 }
Exemplo n.º 2
0
        public ActionResult GetDataAsmPair()
        {
            string id = Request["ids"];
            string dataVersion = Request["dv"];
            CoreLib.SystemData sysData = new SystemData(id, dataVersion);
            //DataTable dataTable = sysData.NodeTable("AssemblingPair");

            DataSet node = sysData.GetNode("AssemblingPair");
            if (node.Tables.Contains("AssemblingPair"))
            {
                DataTable dataTable = node.Tables["AssemblingPair"];
                return Json(CoreLib.Common.GetList<CoreLib.AsmPair>(dataTable), JsonRequestBehavior.AllowGet);
            }
            else
                return null;
        }
Exemplo n.º 3
0
        //
        // GET: /Main/
        public ActionResult Index()
        {
            ViewData["flag"] = 0;
            #region 加载厂家信息
                SystemData systemData = new SystemData();
                DataTable sysList = systemData.GetSysList();
                Dictionary<string, string> vendorList = new Dictionary<string, string>();
                if (sysList.Rows.Count > 0)
                {
                    for (int i = 0; i < sysList.Rows.Count; i++)
                    {
                        string id = sysList.Rows[i]["VendorID"].ToString();
                        string text = sysList.Rows[i]["VendorDescr"].ToString();
                        if (!vendorList.ContainsValue(text) && text != "")
                        {
                            vendorList.Add(id, text);

                        }
                    }
                }
                ViewData["VendorList"] = vendorList;
            #endregion
            return View();
        }
Exemplo n.º 4
0
        public ActionResult Edit(string id,string dataversion)
        {
            if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(dataversion))
            {
                SystemData systemData = new SystemData(id, dataversion);
                ViewData["ID"] = id;//ID

                ViewData["SystemType"] = systemData.GetSysAttribute("SystemType");//系统类型
                ViewData["SystemPattern"] = systemData.GetSysAttribute("SystemPattern");//系统模式
                ViewData["Description"] = systemData.GetSysAttribute("Description");//系统描述
                ViewData["VendorID"] = systemData.GetSysAttribute("VendorID");//厂家ID
                ViewData["VendorDescr"] = systemData.GetSysAttribute("VendorDescr");//厂家名称
                ViewData["ProfileWidth"] = systemData.GetSysAttribute("ProfileWidth");//型材宽度
                ViewData["ProfileThickness"] = systemData.GetSysAttribute("ProfileThickness");//型材壁厚
                ViewData["ExtrudedGasket"] = systemData.GetSysAttribute("ExtrudedGasket");//胶条共挤
                ViewData["SizeC"] = systemData.GetSysAttribute("SizeC");//尺寸差
                ViewData["OverlapH"] = systemData.GetSysAttribute("OverlapH");//水平搭接量
                ViewData["OverlapV"] = systemData.GetSysAttribute("OverlapV");//垂直搭接量
                ViewData["ClearanceG"] = systemData.GetSysAttribute("ClearanceG");//玻璃间隙
                ViewData["GlazingType"] = systemData.GetSysAttribute("GlazingType");//压条安装类型
            }
            ViewData["flag"] = 1;
            return View("index");
        }
Exemplo n.º 5
0
 public ActionResult GetVendorInfo(string id)
 {
     string text = id;
     if (text.Length == 1)
     {
         text = "00" + text;
     }
     else
     {
         if (text.Length == 2)
         {
             text = "0" + text;
         }
     }
     SystemData systemData = new SystemData();
     DataTable dtList = systemData.GetSysList();
     IList<Vendor> list = CoreLib.Common.GetList<Vendor>(dtList);
     var newList = from Vendor s in list
             where s.VendorID == text
             select s;
     return Json(newList);
 }