Example #1
0
        public JsonResult DeleteAccount(int AccountsID)
        {
            string _Del = null;

            try
            {
                KeystoneProject.Buisness_Logic.MasterFinacialAccounts.BL_Accounts objdb = new BL_Accounts();
                Accounts objSG = new Models.MasterFinacialAccounts.Accounts();

                int DependaincyName = objdb.DeleteAccounts(AccountsID);

                if (DependaincyName == 1)
                {
                    _Del = "Account Deleted Successfully";
                }
                else
                {
                    _Del = "Can not Delete";
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(new JsonResult {
                Data = _Del, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Example #2
0
        public JsonResult ShowAllAccounts()
        {
            BL_Accounts db = new BL_Accounts();

            return(new JsonResult {
                Data = db.SelectAllAccounts(), JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Example #3
0
        public ActionResult AjaxMethod(string City)
        {
            KeystoneProject.Buisness_Logic.MasterFinacialAccounts.BL_Accounts BL_obj = new BL_Accounts();
            KeystoneProject.Models.MasterFinacialAccounts.Accounts            obj    = new Accounts();
            List <string> searchList = new List <string>();

            DataTable td = new DataTable();
            DataSet   ds = objbl.GetCity(City, "%");

            td = objbl.GetCountryStateID(Convert.ToInt16(ds.Tables[0].Rows[0]["CityID"].ToString()));

            obj.State     = td.Rows[0]["StateName"].ToString();
            obj.Country   = td.Rows[0]["CountryName"].ToString();
            obj.StateID   = td.Rows[0]["StateID"].ToString();
            obj.CountryID = td.Rows[0]["CountryID"].ToString();


            searchList.Add(obj.State);
            searchList.Add(obj.Country);
            searchList.Add(obj.StateID);
            searchList.Add(obj.CountryID);

            return(Json(searchList));
        }