Exemplo n.º 1
0
        // [TypeFilter(typeof(AuthorizeAction), Arguments = new object[] { "Read" })]
        public IActionResult SummaryView()
        {
            ClientFolioViewModel model = new ClientFolioViewModel();

            InitAccessModel(model);
            return(View(model));
        }
Exemplo n.º 2
0
        // [TypeFilter(typeof(AuthorizeAction), Arguments = new object[] { "Write" })]
        public IActionResult Index()
        {
            ClientFolioViewModel model = new ClientFolioViewModel();

            model.AMCList    = _interface.FillDropDown(Constants.Procedures.GetAMCDropDownByRTA, null);
            model.CLientList = _interface.FillDropDown(Constants.Procedures.GetClientDropDown, null);
            InitAccessModel(model);
            return(View(model));
        }
Exemplo n.º 3
0
 public IActionResult Index(ClientFolioViewModel model)
 {
     if (ModelState.IsValid)
     {
         return(Json(_interface.AddUpdate(model)));
     }
     else
     {
         JsonResponse resp = new JsonResponse();
         resp.Message = Constants.ControllerMessage.All_Fields_Mandatory;
         return(Json(resp));
     }
 }
Exemplo n.º 4
0
        // [TypeFilter(typeof(AuthorizeAction), Arguments = new object[] { "Write" })]
        public IActionResult Update(long ID)
        {
            ClientFolioViewModel model = new ClientFolioViewModel();

            InitAccessModel(model);
            model.clientFolio = _interface.GetClientFolio(ID);
            if (model.clientFolio != null)
            {
                model.AMCList    = _interface.FillDropDown(Constants.Procedures.GetAMCDropDownByRTA, model.clientFolio.RTAID);
                model.SchemaList = _interface.FillDropDown(Constants.Procedures.GetSchemaDropDownByAMC, model.clientFolio.AMCID);
                model.CLientList = _interface.FillDropDown(Constants.Procedures.GetClientDropDown, model.clientFolio.ClientID);
                return(View("Index", model));
            }
            else
            {
                return(RedirectToAction("DateNotFound", "Home"));
            }
        }
        public JsonResponse AddUpdate(ClientFolioViewModel model)
        {
            try
            {
                SqlParameter[] param = new SqlParameter[12];
                param[0]  = new SqlParameter("@ID", model.clientFolio.Id);
                param[1]  = new SqlParameter("@FolioNo", model.clientFolio.FolioNo);
                param[2]  = new SqlParameter("@FolioDate", model.clientFolio.FolioDate);
                param[3]  = new SqlParameter("@InvestorName", model.clientFolio.InvestorName);
                param[4]  = new SqlParameter("@AMCID", model.clientFolio.AMCID);
                param[5]  = new SqlParameter("@SchemeID", model.clientFolio.SchemeID);
                param[6]  = new SqlParameter("@PAN", model.clientFolio.PAN);
                param[7]  = new SqlParameter("@ClientID", model.clientFolio.ClientID);
                param[8]  = new SqlParameter("@AccountTypeID", model.clientFolio.AccountTypeID);
                param[9]  = new SqlParameter("@UserID", 1);
                param[10] = new SqlParameter("@IsActive", model.clientFolio.IsActive);
                param[11] = new SqlParameter("@AccountID", model.clientFolio.AccountID);
                int id = new ADODataFunction().ExecuteNonQuery(Constants.Procedures.AddUpdateClientFolios, param, CommandType.StoredProcedure);
                //  If i != 0 means it affect one data So the data was Inserted.
                if (id != 0)
                {
                    if (model.clientFolio.Id > 0)
                    {
                        resp.Message = Constants.Service.Data_Update_success;
                    }
                    else
                    {
                        resp.Message = Constants.Service.Data_insert_success;
                    }
                    resp.Status = Constants.ResponseStatus.Success;
                }
                else
                {
                    resp.Message = Constants.Service.Common_message;
                }
            }
            catch (Exception ex)
            {
                resp.Message = Constants.Service.Common_message;
            }

            return(resp);
        }