示例#1
0
        /// <summary>
        /// 增加 警局信息
        /// </summary>
        public static AjaxResult AddPoliceStation(NameValueCollection form)
        {
            var entity = new RentPoliceStation();

            entity.Load(form);
            entity.PSID = form["PSID"];
            if (string.IsNullOrEmpty(form["ParentID"]) == true)
            {
                entity.ParentID   = "";
                entity.ParentName = string.Empty;
            }
            else
            {
                entity.ParentName = form["ParentName"];
            }
            if (string.IsNullOrEmpty(form["PSCreatedDate"]) == true)
            {
                entity.PSCreatedDate = System.DateTime.Now;
            }
            if (string.IsNullOrEmpty(form["PSModifiedDate"]) == true)
            {
                entity.PSModifiedDate = System.DateTime.Now;
            }

            return(DB.InsertEntity <RentPoliceStation>(entity));
        }
示例#2
0
 public static AjaxResult UpdatePoliceStation(RentPoliceStation entity)
 {
     return(DB.UpdateEntity <RentPoliceStation>(entity));
 }
示例#3
0
 public static AjaxResult AddPoliceStation(RentPoliceStation entity)
 {
     return(DB.InsertEntity <RentPoliceStation>(entity));
 }