Exemple #1
0
        // GET: Admin
        public ActionResult Index()
        {
            AdminOperations adminOperations = new AdminOperations();
            var             admin           = adminOperations.GetAdminData();

            return(View(admin));
        }
Exemple #2
0
        public MainWindow(int userId)
        {
            this._userId               = userId;
            this._userOptions          = new UserOptions(userId);
            this._invoiceOperations    = new InvoiceOperations(userId);
            this._invoiceLoanCalculate = new InvoiceLoanCalculate(userId);
            this._adminOperations      = new AdminOperations(userId);
            this._groupOperations      = new GroupOperations(userId);

            InitializeComponent();

            Loaded += MainWindow_Loaded;
        }
Exemple #3
0
        /// <summary>
        /// Receives all accounts in relationship tree for the specified account considering user access rights.
        /// </summary>
        /// <param name="accountId">Account unique identifier.</param>
        /// <param name="rootParentAccountId">Unique identifier of maximum level parent account.</param>
        /// <param name="additionalColumnNames">List of names of additional columns to receive.</param>
        /// <returns>List of accounts in relationship tree.</returns>
        private List <AccountInfo> GetRelationshipDiagramAccounts(Guid accountId, Guid rootParentAccountId,
                                                                  List <string> additionalColumnNames)
        {
            List <AccountInfo> resultList           = this.GetAllChildAccounts(rootParentAccountId, additionalColumnNames);
            string             readByAdminOperation =
                AdminOperations.FromEntitySchemaRecordRightOperation(EntitySchemaRecordRightOperation.Read);

            if (!UserConnection.DBSecurityEngine.GetCanExecuteOperation(readByAdminOperation))
            {
                resultList = FilterRelatedAccountsByUserRights(accountId, resultList);
            }
            return(resultList);
        }
        public static object Main(string operation, params object[] args)
        {
            if (Runtime.Trigger == TriggerType.Verification)
            {
                if (ContractOwner.Length == 20)
                {
                    // if param ContractOwner is script hash
                    //return Runtime.CheckWitness(ContractOwner);
                    return(false);
                }
                else if (ContractOwner.Length == 33)
                {
                    // if param ContractOwner is public key
                    byte[] signature = operation.AsByteArray();
                    return(VerifySignature(signature, ContractOwner));
                }
            }
            else if (Runtime.Trigger == TriggerType.VerificationR)
            {
                return(true);
            }
            else if (Runtime.Trigger == TriggerType.Application)
            {
                var result = AdminOperations.HandleAdminOperation(operation, args);
                if (result.IsComplete)
                {
                    return(result.Value);
                }

                result = NepOperations.HandleNepOperation(operation, args);
                if (result.IsComplete)
                {
                    return(result.Value);
                }

                result = TokenOperations.HandleTokenOperation(operation, args);
                if (result.IsComplete)
                {
                    return(result.Value);
                }

                result = GameOperations.HandleGameOperation(operation, args);
                if (result.IsComplete)
                {
                    return(result.Value);
                }
            }

            return(false);
        }
 public List <Seller> GetOwners()
 {
     try
     {
         adminObj = new AdminOperations();
         return(adminObj.GetOwners());
     }
     catch (AdminException)
     {
         throw;
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
 public List <Property> verifyProperty(int propId, bool?state)
 {
     try
     {
         adminObj = new AdminOperations();
         return(adminObj.VerifyProperty(propId, state));
     }
     catch (AdminException)
     {
         throw;
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
 public IQueryable <Property> viewPropbyOwner(int ownerId, string type)
 {
     try
     {
         adminObj = new AdminOperations();
         return(adminObj.viewPropByOwner(ownerId, type));
     }
     catch (AdminException)
     {
         throw;
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
 public IQueryable <Property> viewProp(string state, string city)
 {
     try
     {
         adminObj = new AdminOperations();
         return(adminObj.viewPropByRegion(state, city));
     }
     catch (AdminException)
     {
         throw;
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Exemple #9
0
        public static object Main(string operation, params object[] args)
        {
            if (Runtime.Trigger == TriggerType.Verification)
            {
                if (ContractOwner.Length == 20)
                {
                    return(false);
                }
                else if (ContractOwner.Length == 33)
                {
                    byte[] signature = operation.AsByteArray();
                    return(VerifySignature(signature, ContractOwner));
                }
            }
            else if (Runtime.Trigger == TriggerType.VerificationR)
            {
                return(true);
            }
            else if (Runtime.Trigger == TriggerType.Application)
            {
                var result = AdminOperations.HandleAdminOperation(operation, args);
                if (result.IsComplete)
                {
                    return(result.Value);
                }

                result = NepOperations.HandleNepOperation(operation, args);
                if (result.IsComplete)
                {
                    return(result.Value);
                }

                result = MarketOperations.HandleMarketOperation(operation, args);
                if (result.IsComplete)
                {
                    return(result.Value);
                }
            }

            return(false);
        }
 public CamClient()
 {
     AdminOperations = new AdminOperations(this);
     SoundOperations = new SoundOperations(this);
 }
 public GenelOzetModel()
 {
     adminOp = new AdminOperations();
     uniOp   = new UniverstyOperations();
 }
        public void ProcessRequest(HttpContext context)
        {
            AG_LIVESESSIONEXCEL ag = new AG_LIVESESSIONEXCEL();

            ag.APP_TERM           = context.Request.QueryString["APP_TERM"].ToString();
            ag.APP_LIVESESSION_NO = context.Request.QueryString["APP_LIVESESSION_NO"].ToString();
            ag.APP_DAY            = context.Request.QueryString["APP_DAY"].ToString();
            ag.STUDIO_NUMBER      = context.Request.QueryString["STUDIO_NUMBER"].ToString();
            ag.COURSE_NUMBER      = context.Request.QueryString["COURSE_NUMBER"].ToString();
            ag.STUDY_LEVEL        = context.Request.QueryString["STUDY_LEVEL"].ToString();
            ag.EMAIL = context.Request.QueryString["EMAIL"].ToString();
            ag.APP_SESSION_NUMBER = context.Request.QueryString["APP_SESSION_NUMBER"].ToString();

            ChangeLiveSession data = AdminOperations.GetDocReasonPath(ag);

            // var data =   DB.Contents.FirstOrDefault(x => x.contentId == Convert.ToInt32(id));
            if (data != null && !String.IsNullOrEmpty(data.NEW_DOC_PATH))
            {
                string ext  = Path.GetExtension(data.NEW_DOC_PATH);
                string path = "";
                if (ext == ".pdf")
                {
                    context.Response.Clear();
                    context.Response.ContentType = "application/pdf";
                    context.Response.AddHeader("Content-Disposition", "attachment; filename=" + data.STAFF_NAME + "_" + data.COURSE_NAME + ".pdf");
                    //int indexofslash = data.uploadedFile.LastIndexOf('/');
                    //int indexofdot = data.uploadedFile.Length-1;
                    //string uploadedfile = data.uploadedFile.Remove(indexofslash, indexofdot);
                    //string newname = uploadedfile + data.contentNameEn + ".pdf";
                    path = context.Server.MapPath(data.NEW_DOC_PATH).Replace(@"\_handlers", string.Empty);
                }
                else if (ext == ".jpg")
                {
                    context.Response.Clear();
                    context.Response.ContentType = "image/jpeg";
                    context.Response.AddHeader("Content-Disposition", "attachment; filename=" + data.STAFF_NAME + "_" + data.COURSE_NAME + ".jpg");
                    //int indexofslash = data.uploadedFile.LastIndexOf('/');
                    //int indexofdot = data.uploadedFile.Length-1;
                    //string uploadedfile = data.uploadedFile.Remove(indexofslash, indexofdot);
                    //string newname = uploadedfile + data.contentNameEn + ".pdf";
                    path = context.Server.MapPath(data.NEW_DOC_PATH).Replace(@"\_handlers", string.Empty);
                }


                if (File.Exists(path))
                {
                    context.Response.WriteFile(path);
                    context.Response.Flush();
                    context.Response.End();
                }
                else
                {
                    context.Response.ContentType = "text/plain";

                    context.Response.Write("File not Exists");
                    context.Response.Flush();
                    context.Response.End();
                }
                return;
            }

            context.Response.ContentType = "text/plain";
            context.Response.Write("No file to download");
            context.Response.Flush();
            context.Response.End();
        }
 public loginController()
 {
     adminactionst = new AdminOperations();
 }