示例#1
0
        public ActionResult pullone(string productno)
        {
            dynamic data    = new System.Dynamic.ExpandoObject();
            var     no      = WebRequest.GetString("no", true);
            var     type    = WebRequest.GetString("type", true);
            var     model   = new V_ProductPullModel();
            var     product = new V_ProductionModel();
            var     message = "";
            var     order   = "";

            if (type == "" || no == "")
            {
                #region 创建申请单
                type    = "add";
                no      = bomService.GetProductPullNo();
                product = ServiceDB.Instance.QueryOneModel <V_ProductionModel>("select top 1 * from V_ProductionModel where produceNo='" + productno + "'");
                #endregion
            }
            else if (type == "edit")
            {
                model   = ServiceDB.Instance.QueryOneModel <V_ProductPullModel>("select * from V_ProductPullModel where pullNo='" + no + "'");
                product = ServiceDB.Instance.QueryOneModel <V_ProductionModel>("select top 1 * from V_ProductionModel where produceNo='" + model.produceNo + "'");
            }
            data.no    = no;
            data.one   = model;
            data.order = order;

            data.product = product;
            data.message = message;
            data.type    = type;
            return(View(data));
        }