Esempio n. 1
0
 public int InsertClient(Project_Client model)
 {
     return _customRepository.InsertClient(model);
 }
Esempio n. 2
0
        public int InsertClient(Project_Client model)
        {
            var sql = GetSqlConnection();
            var result = sql.Query<int>("V3_Insert_Client", new
            {
                model.Name,
                model.iCreated
            },
                                           commandType: CommandType.StoredProcedure).FirstOrDefault();

            sql.Close();

            return result;
        }
Esempio n. 3
0
        public ActionResult NewClient(Project_Client model)
        {
            if (_service.ExistedClient(model.Name) > 0)
            {
                return Json(new { result = Constants.Duplicate });
            }

            try
            {
                _service.InsertClient(model);

                return Json(new { result = Constants.Success });
            }
            catch (Exception e)
            {
                Log.Error("Create New Client!", e);
                return Json(new { result = Constants.UnSuccess });
            }
        }