public ActionResult giveone(string pullno) { dynamic data = new System.Dynamic.ExpandoObject(); var no = WebRequest.GetString("no", true); var type = WebRequest.GetString("type", true); var model = new V_ProductGiveModel(); var pull = new V_ProductPullModel(); var message = ""; var order = ""; if (type == "" || no == "") { #region 创建申请单 type = "add"; no = bomService.GetProductGiveNo(); pull = ServiceDB.Instance.QueryOneModel <V_ProductPullModel>("select top 1 * from V_ProductPullModel where pullNo='" + pullno + "'"); #endregion } else if (type == "edit") { model = ServiceDB.Instance.QueryOneModel <V_ProductGiveModel>("select * from V_ProductGiveModel where giveNo='" + no + "'"); pull = ServiceDB.Instance.QueryOneModel <V_ProductPullModel>("select top 1 * from V_ProductPullModel where pullNo='" + model.pullNo + "'"); } data.no = no; data.one = model; data.order = order; data.pull = pull; data.message = message; data.type = type; return(View(data)); }