Ejemplo n.º 1
0
        public frmReplies(int nBulletinID, int nMemoID, int nEmployeeID, ACMSLogic.Staff.MemoReplyAction aAction)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            ACMS.XtraUtils.XtraEditors.SetDateEditFormat(this.Controls);
            this.nBulletinID = nBulletinID;
            this.nMemoID = nMemoID;
            this.nEmployeeID = nEmployeeID;
            myAction = aAction;
            this.Text = string.Format(this.Text, myAction.ToString());
            myMemo = new ACMSLogic.Staff.Memo();

            new ACMS.XtraUtils.LookupEditBuilder.EmployeeIDLookupEditBuilder(luedtEmployeeID.Properties);

            if (myAction != ACMSLogic.Staff.MemoReplyAction.Add)
            {
                myTable = myMemo.GetReply(nBulletinID);
                BindData();
            }
            else
            {
                dateEdit1.DateTime = DateTime.Now.Date;
                luedtEmployeeID.EditValue = nEmployeeID;
            }
            if (myAction == ACMSLogic.Staff.MemoReplyAction.View)
            {
                sbtnSave.Visible = false;
                memoEdit1.Properties.ReadOnly = true;
                sbtnCancel.Text = "Close";
            }
        }
Ejemplo n.º 2
0
        public frmReplies(int nBulletinID, int nMemoID, int nEmployeeID, ACMSLogic.Staff.MemoReplyAction aAction)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            ACMS.XtraUtils.XtraEditors.SetDateEditFormat(this.Controls);
            this.nBulletinID = nBulletinID;
            this.nMemoID     = nMemoID;
            this.nEmployeeID = nEmployeeID;
            myAction         = aAction;
            this.Text        = string.Format(this.Text, myAction.ToString());
            myMemo           = new ACMSLogic.Staff.Memo();

            new ACMS.XtraUtils.LookupEditBuilder.EmployeeIDLookupEditBuilder(luedtEmployeeID.Properties);

            if (myAction != ACMSLogic.Staff.MemoReplyAction.Add)
            {
                myTable = myMemo.GetReply(nBulletinID);
                BindData();
            }
            else
            {
                dateEdit1.DateTime        = DateTime.Now.Date;
                luedtEmployeeID.EditValue = nEmployeeID;
            }
            if (myAction == ACMSLogic.Staff.MemoReplyAction.View)
            {
                sbtnSave.Visible = false;
                memoEdit1.Properties.ReadOnly = true;
                sbtnCancel.Text = "Close";
            }
        }