Exemple #1
0
 public ActionResult Add(FormCollection form, GX_RJXX gxrjxx)
 {
     try
     {
         gxrjxx.ID         = new Common().GetRandom();
         gxrjxx.RJBH       = new Common().GetRandom().ToString();
         gxrjxx.RJZT       = "1";
         gxrjxx.XMYSXXID   = ConvertUtility.ToDecimal(form["Id"]);
         gxrjxx.GCBH       = form["gcbh"];
         gxrjxx.RJMC       = form["RJMC"];
         gxrjxx.GJZ        = gxrjxx.GCBH + "_" + form["GCRJBH"];
         gxrjxx.GCRJBH     = form["GCRJBH"];
         gxrjxx.JGSL       = ConvertUtility.ToInt(form["JGSL"]);
         gxrjxx.DXLX       = form["DXLX"];
         gxrjxx.RSJCC      = form["RSJCC"];
         gxrjxx.DXLX       = form["DXLX"];
         gxrjxx.LONGITUDE  = form["LONGITUDE"];
         gxrjxx.LATITUDE   = form["LATITUDE"];
         gxrjxx.CREATEBY   = CurrentUser.UserName;
         gxrjxx.CREATETIME = DateTime.Now;
         gxXlzxBusiness.Add(gxrjxx);
         return(Json(gxXlzxBusiness.SaveChange() > 0 ? AjaxResult.Success("数据操作成功!") : AjaxResult.Error("数据操作失败!")));
     }
     catch (Exception ex) {
         return(Json(AjaxResult.Error("数据操作失败!")));
     }
 }
Exemple #2
0
        public ActionResult Edit(FormCollection form, GX_RJXX gxrjxx)
        {
            decimal id    = ConvertUtility.ToDecimal(form["Id"]);
            var     model = gxXlzxBusiness.Find(id);

            if (model == null)
            {
                return(Json(AjaxResult.Error("未找到需要更新的数据!")));
            }
            gxrjxx            = model;
            gxrjxx.RJMC       = form["RJMC"];
            gxrjxx.GCRJBH     = form["GCRJBH"];
            gxrjxx.JGSL       = ConvertUtility.ToInt(form["JGSL"]);
            gxrjxx.DXLX       = form["DXLX"];
            gxrjxx.RSJCC      = form["RSJCC"];
            gxrjxx.DXLX       = form["DXLX"];
            gxrjxx.LONGITUDE  = form["LONGITUDE"];
            gxrjxx.LATITUDE   = form["LATITUDE"];
            gxrjxx.MODIFYBY   = CurrentUser.UserName;
            gxrjxx.MODIFYTIME = DateTime.Now;
            gxXlzxBusiness.Update(gxrjxx);
            return(Json(gxXlzxBusiness.SaveChange() > 0 ? AjaxResult.Success("数据操作成功!") : AjaxResult.Error("数据操作失败!")));
        }
Exemple #3
0
        public void Delete(GX_RJXX gxRjxx)
        {
            GxRjxxRepository gxRjxxRepository = new GxRjxxRepository(uw);

            gxRjxxRepository.DeleteEntity(gxRjxx);
        }
Exemple #4
0
        public void Add(GX_RJXX gxRjxx)
        {
            GxRjxxRepository gxRjxxRepository = new GxRjxxRepository(uw);

            gxRjxxRepository.AddEntity(gxRjxx);
        }