Example #1
0
        /// <summary>
        /// Открывает новый счет с пустым балансом
        /// </summary>
        /// <param name="status"></param>
        /// <param name="num"></param>
        public void NewCashAcc(string status, string num)
        {
            string       inn  = "";
            string       pass = "";
            string       sql  = "";
            CashAccounts ca   = new CashAccounts()
            {
                AccFinance = 0,
                Active     = true,
                NumCashAcc = GetNewCashAcc(),
                PeriodAcc  = DateTime.Now.AddYears(5),
                TypeAcc    = "DEPOSITE"
            };

            try
            {
                if (status == "COMPANY")
                {
                    inn             = num;
                    ca.NumClientINN = num;
                    sk.CashAccounts.Local.Add(ca);
                }
                else
                {
                    pass = num;
                    ca.NumClientPassport = num;
                    sk.CashAccounts.Local.Add(ca);
                }

                sk.SaveChanges();
            }
            catch (Exception e) { MessageBox.Show(e.Message); }
        }
Example #2
0
 public JsonResult Index(List <int> listOfSkill, int userId)
 {
     foreach (var item in listOfSkill)
     {
         AssignSkill objAssignSkill = new AssignSkill()
         {
             SkillId = item,
             UserId  = userId
         };
         objSkillDbEntities.AssignSkills.Add(objAssignSkill);
         objSkillDbEntities.SaveChanges();
     }
     return(Json(new { messsage = "Skill Successfully Assign", success = true }, JsonRequestBehavior.AllowGet));
 }