Ejemplo n.º 1
0
 public ActionResult AddattachInfo_purchase(询价采购 model)
 {
     询价采购 m = 询价采购管理.查找询价采购(model.Id);
     m.订单号 = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString();
     m.生成日期 = DateTime.Now;
     m.采购单位.用户ID = currentUser.Id;
     m.附加信息 = model.附加信息;
     询价采购管理.更新询价采购(m);
     return Redirect("/单位用户后台/OrderInfo");
 }
Ejemplo n.º 2
0
 public ActionResult CreateInfo()
 {
     询价采购 model = new 询价采购();
     long id = long.Parse(Request.Form["yjsp"]);
     model.询价商品.商品ID = id;
     NameValueCollection coll = Request.Form;
     int count = coll.Count / 3;
     List<_议价列表> list = new List<_议价列表>();
     for (int i = 0; i < count; i++)
     {
         _议价列表 m = new _议价列表();
         m.备注 = Request.Form["note" + i];
         m.供应商.用户ID = long.Parse(Request.Form["gid" + i]);
         m.数量 = int.Parse(Request.Form["number" + i]);
         m.议价商品.商品ID = id;
         list.Add(m);
     }
     model.采购单位.用户ID = currentUser.Id;
     model.议价列表 = list;
     询价采购管理.添加询价采购(model);
     return Redirect("/单位用户后台/ConsultDetail?id=" + model.Id);
 }
Ejemplo n.º 3
0
 public ActionResult CounsultStepTwo()
 {
     string gid = Request.Form["gid"];
     string[] ids = gid.Split(',');
     long goodid = long.Parse(Request.Form["pid"]);
     List<long> id = new List<long>();
     for (int i = 0; i < ids.Length - 1; i++)
     {
         id.Add(long.Parse(ids[i]));
     }
     IEnumerable<供应商> gys = 用户管理.查询用户<供应商>(0, 0, Query<供应商>.In(m => m.Id, id));
     询价采购 model = new 询价采购();
     List<_议价列表> consult = new List<_议价列表>();
     foreach (var item in gys)
     {
         _议价列表 yj = new _议价列表();
         yj.供应商.用户ID = item.Id;
         yj.议价商品.商品ID = goodid;
         yj.数量 = 1;
         consult.Add(yj);
     }
     model.议价列表 = consult;
     model.询价商品.商品ID = goodid;
     return View(model);
 }
Ejemplo n.º 4
0
 public static bool 更新询价采购(询价采购 content, bool f = true)
 {
     return Mongo.更新(content,f);
 }
Ejemplo n.º 5
0
 public static bool 添加询价采购(询价采购 content)
 {
     return Mongo.添加(content);
 }
Ejemplo n.º 6
0
 public ActionResult ConfirmInfo(询价采购 model)
 {
     try
     {
         询价采购 m = 询价采购管理.查找询价采购(model.Id);
         m.供货信息 = model.供货信息;
         m.确认订单 = true;
         询价采购管理.更新询价采购(m);
         return Redirect("/供应商后台/ConsultList");
     }
     catch
     {
         return Redirect("/供应商后台/ConsultList");
     }
 }