protected override void initializeAbilities()
        {
            SpecifiedSlot  = newField <string>("specifiedSlot", _specifiedSlot);
            SpecifiedValue = newField <string>("specifiedValue", _specifiedValue);
            CountValue     = newField <int>("countValue", _countValue);

            this
            .AddAbility("set " + _databaseName + " specifier $specifier").CallAction(_ability_setSpecifier)
            .Param(SpecifiedSlot, "$specifier")
            .Param(SpecifiedValue, "$specifier")

            .AddAnswer("value of $slot from " + _databaseName + " database", Question.HowToEvaluate).Call(_value_slotValue)
            .Param(SpecifiedSlot, "$slot")

            .AddAnswer(_databaseName + " database has $count result", Question.IsItTrue).Call(_value_resultCountCondition)
            .Param(CountValue, "$count")
            ;

            // register all values
            foreach (var column in _externalDatabase.Columns)
            {
                Container.AddSpanElement(column);
                foreach (var value in _externalDatabase.GetColumnValues(column))
                {
                    Container.AddSpanElement(value);
                    Container.Add(SemanticItem.From(Question.WhatItSpecifies, column, Constraints.WithInput(value)));
                }
            }
        }
Пример #2
0
        public Boolean UpdateModuleUserField(String ModuleID, String ModuleCode, ModuleField moduleField)
        {
            Boolean Result = false;

            StringBuilder Sql_Update = new StringBuilder();

            // 增加查询条件 Scdel=0     2013-10-19
            Sql_Update.Append("Select * From sys_biz_moduleview where Scdel=0 and ModuleID='");
            Sql_Update.Append(ModuleID);
            Sql_Update.Append("' and ModuleCode='");
            Sql_Update.Append(ModuleCode);
            Sql_Update.Append("' and ID = '");
            Sql_Update.Append(moduleField.Index);
            Sql_Update.Append("'");

            DataTable Data = GetDataTable(Sql_Update.ToString());

            if (Data != null && Data.Rows.Count > 0)
            {
                DataRow Row = Data.Rows[0];
                Row["ID"]               = moduleField.Index;
                Row["SCTS"]             = DateTime.Now.ToString();
                Row["ModuleCode"]       = moduleField.ModuleCode;
                Row["ModuleID"]         = moduleField.ModuleIndex;
                Row["Description"]      = moduleField.Description;
                Row["TableName"]        = moduleField.TableName;
                Row["TableText"]        = moduleField.TableText;
                Row["ContentType"]      = moduleField.ContentType.ToString();
                Row["ContentFieldType"] = moduleField.ContentFieldType;
                Row["ContentText"]      = moduleField.ContentText;
                Row["Contents"]         = moduleField.Contents;
                Row["ForeColor"]        = moduleField.ForeColor.ToArgb();
                Row["BgColor"]          = moduleField.BgColor.ToArgb();
                Row["DisplayStyle"]     = moduleField.DisplayStyle;
                Row["ColumnWidth"]      = moduleField.ColumnWidth;
                Row["IsVisible"]        = moduleField.IsVisible;
                Row["IsEdit"]           = moduleField.IsEdit;
                Row["IsNull"]           = moduleField.IsNull;
                Row["OrderIndex"]       = moduleField.OrderIndex;

                Row["Scts_1"] = DateTime.Now.ToString();
            }

            object r = Update(Data);

            Result = (Convert.ToInt32(r) == 1);

            return(Result);
        }
Пример #3
0
        public List <ModuleField> GetModuleFields(String ModuleID, String ModuleCode)
        {
            List <ModuleField> Results = new List <ModuleField>();

            StringBuilder Sql_Select = new StringBuilder();

            // 增加查询条件 Scdel=0     2013-10-19
            Sql_Select.Append("select *,'true' as IsSystem from sys_moduleview  where Scdel=0 and ModuleID = '");
            Sql_Select.Append(ModuleID);
            Sql_Select.Append("' union ");
            // 增加查询条件 Scdel=0     2013-10-19
            Sql_Select.Append("select *,'false' as IsSystem from sys_biz_moduleview where Scdel=0 and ModuleID = '");
            Sql_Select.Append(ModuleID);
            Sql_Select.Append("' and ModuleCode = '");
            Sql_Select.Append(ModuleCode);
            Sql_Select.Append("' order by IsSystem desc,OrderIndex");
            DataTable Data = GetDataTable(Sql_Select.ToString());

            foreach (DataRowView Row in Data.DefaultView)
            {
                ModuleField field = new ModuleField();
                field.Index            = Row["ID"].ToString();
                field.ModuleCode       = Row["ModuleCode"].ToString();
                field.ModuleIndex      = Row["ModuleID"].ToString();
                field.Description      = Row["Description"].ToString();
                field.TableName        = Row["TableName"].ToString();
                field.TableText        = Row["TableText"].ToString();
                field.ContentType      = (ContentType)Enum.Parse(typeof(ContentType), Row["ContentType"].ToString());
                field.ContentFieldType = Row["ContentFieldType"].ToString();
                field.ContentText      = Row["ContentText"].ToString();
                field.Contents         = Row["Contents"].ToString();
                field.ForeColor        = Color.FromArgb(Convert.ToInt32(Row["ForeColor"]));
                field.BgColor          = Color.FromArgb(Convert.ToInt32(Row["BgColor"]));
                field.DisplayStyle     = Row["DisplayStyle"].ToString();
                field.ColumnWidth      = Convert.ToInt32(Row["ColumnWidth"]);
                field.IsVisible        = Convert.ToBoolean(Row["IsVisible"]);
                field.IsEdit           = Convert.ToBoolean(Row["IsEdit"]);
                field.IsNull           = Convert.ToBoolean(Row["IsNull"]);
                field.IsSystem         = Convert.ToBoolean(Row["IsSystem"]);
                field.OrderIndex       = Convert.ToInt32(Row["OrderIndex"]);

                Results.Add(field);
            }

            return(Results);
        }
Пример #4
0
        private int GetMaxOrder()
        {
            int MaxValue = -1;

            foreach (Row row in this.fpSpread1.ActiveSheet.Rows)
            {
                ModuleField modelField = row.Tag as ModuleField;
                if (modelField == null)
                {
                    continue;
                }

                if (modelField.OrderIndex > MaxValue)
                {
                    MaxValue = modelField.OrderIndex;
                }
            }

            return(MaxValue + 1);
        }
Пример #5
0
        protected void SetQRCode(JinianNet.JNTemplate.TemplateContext context, string id)
        {
            QRCode      qr = new QRCode();
            ModuleField moduleFieldQRCodeType = this.ModuleFields.FirstOrDefault(f => f.Code == "QRCodeType");
            ModuleField moduleFieldQRCodeUrl  = this.ModuleFields.FirstOrDefault(f => f.Code == "QRCodeUrl");
            string      url = "http://www.vgo2013.com/WebService/QR.aspx";

            if (moduleFieldQRCodeUrl != null)
            {
                url = moduleFieldQRCodeUrl.Value;
            }
            if (moduleFieldQRCodeType != null && moduleFieldQRCodeType.Value == "ImageQRCode")
            {
                context.TempData["qrcode"] = qr.GetImageQRCode(url + "?ID=" + id);
            }
            else
            {
                context.TempData["qrcode"] = qr.GetQRCode(url + "?ID=" + id);
            }
        }
Пример #6
0
 internal CommandControlModule(Body body)
 {
     _body = body;
     _inputLiteralField = newField <string>("InputLiteral", _param_inputLiteral);
     _evaluationField   = newField <string>("Evaluation", _param_evaluation);
 }
Пример #7
0
        public static Boolean UpdateModuleUserField(String ModuleID, String ModuleCode, ModuleField moduleField)
        {
            Boolean Result = Convert.ToBoolean(Agent.CallLocalService("Yqun.BO.BusinessManager.dll", "UpdateModuleUserField", new object[] { ModuleID, ModuleCode, moduleField }));

            return(Result);
        }
 public static Boolean UpdateModuleSystemField(String ModuleID, String ModuleCode, ModuleField moduleField)
 {
     return(Convert.ToBoolean(Agent.CallService("Yqun.BO.BusinessManager.dll", "UpdateModuleSystemField", new object[] { ModuleID, ModuleCode, moduleField })));
 }
Пример #9
0
        internal AdviceModule(Body body)
        {
            _body = body;

            _simplifiedField = newField <string>("SimplifiedField", _field_simplified);
        }