Пример #1
0
        public ActionResult PrintJHs()
        {
            string JHID = Request["Info"];

            string where = "";
            string s = "";

            if (!string.IsNullOrEmpty(JHID))
            {
                s += " JHID like '%" + JHID + "%' ";
            }
            if (!string.IsNullOrEmpty(s))
            {
                where = " where  " + s;
            }
            string strErr = "";

            string    tableName = " BGOI_Produce.dbo.tk_Product_PlanDetail  ";
            DataTable dt        = ProduceMan.PrintJHs(where, tableName, ref strErr);

            if (dt == null)
            {
                return(Json(new { success = false }));
            }
            else
            {
                return(Json(new { success = true, datas = GFun.Dt2Json("", dt) }));
            }
        }
Пример #2
0
        public ActionResult PrintJH()
        {
            string JHID = Request["Info"];

            string where = "";
            string s = "";

            if (!string.IsNullOrEmpty(JHID))
            {
                s += " JHID like '%" + JHID + "%' ";
            }
            if (!string.IsNullOrEmpty(s))
            {
                where = " where Validate='v' and " + s;
            }
            string strErr = "";

            string          tableName = " BGOI_Produce.dbo.tk_Product_Plan ";
            DataTable       data      = ProduceMan.PrintJHs(where, tableName, ref strErr);
            tk_Product_Plan so        = new TECOCITY_BGOI.tk_Product_Plan();

            foreach (DataRow dt in data.Rows)
            {
                so.JHID                   = dt["JHID"].ToString();
                so.Specifieddate          = Convert.ToDateTime(dt["Specifieddate"]);
                ViewData["Specifieddate"] = so.Specifieddate.ToString("yyyy年MM月dd日");
            }
            return(View(so));
        }