Exemplo n.º 1
0
        protected void Button41_Click(object sender, EventArgs e)
        {
            BUser bus = new BUser();

            GTS.Clock.Model.Security.User           user = bus.GetByID(15);
            GTS.Clock.Model.AppSetting.UserSettings set  = user.UserSetting;
        }
Exemplo n.º 2
0
 protected void CallBack_GridPrivateMessageSend_PrivateMessage_onCallBack(object sender, ComponentArt.Web.UI.CallBackEventArgs e)
 {
     GTS.Clock.Model.Security.User user = new GTS.Clock.Model.Security.User();
     user = BUser.CurrentUser;
     SetPrivateMessageSendPageCount_PrivateMessage();
     this.Fill_GridPrivateMessageSend_PrivateMessage(int.Parse(this.StringBuilder.CreateString(e.Parameters[0])), int.Parse(this.StringBuilder.CreateString(e.Parameters[1])), user.Person.ID);
     this.GridPrivateMessageSend_PrivateMessage.RenderControl(e.Output);
     this.hfPrivateMessageSendPageCount_PrivateMessage.RenderControl(e.Output);
     this.errorHiddenFieldSend_PrivateMessage.RenderControl(e.Output);
 }
Exemplo n.º 3
0
 protected void CallBack_GridPrivateMessageReceive_PrivateMessage_onCallBack(object sender, ComponentArt.Web.UI.CallBackEventArgs e)
 {
     AttackDefender.CSRFDefender(this.Page);
     GTS.Clock.Model.Security.User user = new GTS.Clock.Model.Security.User();
     user = BUser.CurrentUser;
     SetPrivateMessageReceivePageCount_PrivateMessage();
     this.Fill_GridPrivateMessageReceive_PrivateMessage(int.Parse(this.StringBuilder.CreateString(e.Parameters[0]), CultureInfo.InvariantCulture), int.Parse(this.StringBuilder.CreateString(e.Parameters[1]), CultureInfo.InvariantCulture), user.Person.ID);
     this.GridPrivateMessageReceive_PrivateMessage.RenderControl(e.Output);
     this.hfPrivateMessageReceivePageCount_PrivateMessage.RenderControl(e.Output);
     this.hfPrivateMessageReceiveCount_PrivateMessage.RenderControl(e.Output);
     this.errorHiddenFieldReceive_PrivateMessage.RenderControl(e.Output);
 }
Exemplo n.º 4
0
    public string[] UpdateConditions_ReportParametersConditionsPage(string ConditionID, string ReportID, string ConditionText, string ConditionValue, string OrderText, string OrderValue, string TrafficConditionValue)
    {
        this.InitializeCulture();

        string[] retMessage = new string[4];

        try
        {
            decimal conditionID   = decimal.Parse(this.StringBuilder.CreateString(ConditionID), CultureInfo.InvariantCulture);
            decimal reportID      = decimal.Parse(this.StringBuilder.CreateString(ReportID), CultureInfo.InvariantCulture);
            string  conditionText = "";
            if (ConditionText != null)
            {
                conditionText = this.StringBuilder.CreateString(ConditionText, StringGeneratorExceptionType.ReportCondition);
            }
            string conditionValue = "";
            if (ConditionValue != null)
            {
                conditionValue = this.StringBuilder.CreateString(ConditionValue, StringGeneratorExceptionType.ReportCondition);
            }

            string trafficConditionValue = "";
            if (trafficConditionValue != null)
            {
                trafficConditionValue = this.StringBuilder.CreateString(TrafficConditionValue, StringGeneratorExceptionType.ReportCondition);
            }
            string orderText = "";
            if (OrderText != null)
            {
                orderText = this.StringBuilder.CreateString(OrderText, StringGeneratorExceptionType.ReportCondition);
            }

            string orderValue = "";
            if (OrderValue != null)
            {
                orderValue = this.StringBuilder.CreateString(OrderValue, StringGeneratorExceptionType.ReportCondition);
            }

            GTS.Clock.Model.Security.User currentUser = BUser.CurrentUser;

            GTS.Clock.Model.Report.DesignedReportCondition conditionObj = new GTS.Clock.Model.Report.DesignedReportCondition();
            conditionObj.ID = conditionID;
            GTS.Clock.Model.Report.Report reportObj = new GTS.Clock.Model.Report.Report();
            GTS.Clock.Model.Person        personObj = new GTS.Clock.Model.Person()
            {
                ID = currentUser.Person.ID
            };
            reportObj.ID = reportID;

            conditionObj.ConditionText         = conditionText;
            conditionObj.ConditionValue        = conditionValue;
            conditionObj.TrafficConditionValue = trafficConditionValue;
            conditionObj.Report     = reportObj;
            conditionObj.Person     = personObj;;
            conditionObj.OrderText  = orderText;
            conditionObj.OrderValue = orderValue;


            UIActionType uam;
            if (conditionID == 0)
            {
                conditionID = ConditionBusiness.InsertCondition(conditionObj);
                uam         = UIActionType.ADD;
            }
            else
            {
                conditionID = ConditionBusiness.UpdateCondition(conditionObj);
                uam         = UIActionType.EDIT;
            }

            retMessage[0] = GetLocalResourceObject("RetSuccessType").ToString();
            string SuccessMessageBody = string.Empty;
            switch (uam)
            {
            case UIActionType.ADD:
                SuccessMessageBody = GetLocalResourceObject("AddComplete").ToString();
                break;

            case UIActionType.EDIT:
                SuccessMessageBody = GetLocalResourceObject("EditComplete").ToString();
                break;

            case UIActionType.DELETE:
                SuccessMessageBody = GetLocalResourceObject("DeleteComplete").ToString();
                break;

            default:
                break;
            }
            retMessage[1] = SuccessMessageBody;
            retMessage[2] = "success";
            retMessage[3] = conditionID.ToString();
            return(retMessage);
        }
        catch (UIValidationExceptions ex)
        {
            retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage);
            return(retMessage);
        }
        catch (UIBaseException ex)
        {
            retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage);
            return(retMessage);
        }
        catch (Exception ex)
        {
            retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage);
            return(retMessage);
        }
    }