コード例 #1
0
ファイル: LookupLabel.cs プロジェクト: anthrax3/AForm
        public void SetKey(ConnectorSysEventArgs eventArgs)
        {
            if (eventArgs.EndPointValue != null)
            {
                string table        = this["Table"].GetValue <string>();
                string displayField = this["DisplayField"].GetValue <string>();
                string pkField      = this["PKField"].GetValue <string>();

                //seelct displayField from targetTable where PK_ID = eventArgs.EndPointValue
                DynamicRow myRow = DynamicRow.FindRow <long>(table, (long)eventArgs.EndPointValue);
                ctl.Text = "pk=" + (eventArgs.EndPointValue.ToString()) + " value=" + myRow[displayField].fValue.ToString();
            }
        }
コード例 #2
0
        public void PerformValidation(ConnectorSysEventArgs eventArgs)
        {
            //string currentValue
            string currentValue = (string)blockWeb["frmMain"]["PK_ID"].ProcessRequest()[0];

            if (currentValue == null || currentValue.Length == 0)
            {
                eventArgs.CancelOperation     = true;
                eventArgs.FastCancelOperation = true;

                //show inner controls
                foreach (string id in innerWeb.Blocks)
                {
                    blockWeb[id].ProcessRequest("SetVisible", true);
                }
            }
        }
コード例 #3
0
        public void SetText(ConnectorSysEventArgs args)
        {
            if (args.EndPointValue != null)
            {
                ctl.Text = args.EndPointValue.ToString();
            }

            if (args.RequestArgs != null && args.RequestArgs[0] is ConnectorSysEventArgs)
            {
                ConnectorSysEventArgs args2 = args.RequestArgs[0] as ConnectorSysEventArgs;

                if (args2.EndPointValue != null)
                {
                    ctl.Text = args2.EndPointValue.ToString();
                }
            }
        }