Пример #1
0
        public static bool Insert_ProfessionType(ProfessionTypeVM model)
        {
            try
            {
                if (string.IsNullOrEmpty(model.ProfCode))
                {
                    strAutoCode = sysfun.GetNewMaxID("Profession", "ProfCode", 5, "COMON");
                }
                else
                {
                    strAutoCode = model.ProfCode;
                }


                SqlParameter[] param =
                {
                    new SqlParameter("@DealerCode", model.DealerCode),            //0
                    new SqlParameter("@ProfTypeCode", strAutoCode),               //1
                    new SqlParameter("@ProfTypeDesc", model.ProfDesc),            //2
                    new SqlParameter("@UpdUser", AuthBase.UserId),                //3
                    new SqlParameter("@UpdTerm", General.CurrentIP)               //4
                };
                dt = DataAccess.getDataTable("Sp_Insert_ProfessionType", param, General.GetBMSConString());
                if (dt.Rows.Count > 0)
                {
                }
                IsSaved = true;
            }
            catch (Exception)
            {
                throw;
            }

            return(IsSaved);
        }
        public JsonResult Insert_ProfessionType(ProfessionTypeVM objects)
        {
            bool result = false;

            string msg = "Failed to save record..";

            result = ProfessionMethods.Insert_ProfessionType(objects);

            if (result)
            {
                msg = "Successfully Added";
            }

            return(Json(new { Success = result, Message = msg }, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
 public static bool Insert_ProfessionType(ProfessionTypeVM objects, string s)
 {
     throw new NotImplementedException();
 }