コード例 #1
0
        public object SetValue(RuleKeyAI ruleKey, int A4)
        {
            string Text = ruleKey.ToStringValue;
            //ГГММДД
            int yy = 0, mm = 0, dd = 0, yyyy = 0, MM = 0, HH = 0, ss = 0;

            Int32.TryParse(Text.Remove(2), out yy);
            Int32.TryParse(Text.Remove(0, 2).Remove(2), out mm);
            Int32.TryParse(Text.Remove(0, 4).Remove(2), out dd);
            Int32.TryParse(Text.Remove(0, 6).Remove(2), out HH);
            Int32.TryParse(Text.Remove(0, 8).Remove(2), out MM);
            Int32.TryParse(Text.Remove(0, 10), out ss);

            if (yy < 0)
            {
                yyyy = 2000 - yy;
            }
            else if (yy < 51)
            {
                yyyy = 2000 + yy;
            }
            else
            {
                yyyy = 1900 + yy;
            }
            return(new DateTime(yyyy, mm, dd, HH, MM, ss));
        }
コード例 #2
0
        public object SetValue(RuleKeyAI ruleKey, int A4)
        {
            string Text = ruleKey.ToStringValue;
            //ГГММДД
            int yy = 0, mm = 0, dd = 0, yyyy = 0;

            Int32.TryParse(Text.Remove(2), out yy);
            Int32.TryParse(Text.Remove(0, 2).Remove(2), out mm);
            Int32.TryParse(Text.Remove(0, 4), out dd);
            yyyy = 2000 + yy;
            return(new DateTime(yyyy, mm, dd));
        }
コード例 #3
0
        public object SetValue(RuleKeyAI ruleKey, int A4)
        {
            string Text = ruleKey.ToStringValue;

            if (A4 > 0 && Text.Length > 0)
            {
                int count = Text.Length + 1;
                int i     = Text.Length - A4;
                Text = Text.Remove(i) + "," + Text.Remove(0, i);
            }
            double d = 0;

            Double.TryParse(Text, out d);
            return(d);
        }
コード例 #4
0
 public object SetValue(RuleKeyAI ruleKey, int parament)
 {
     return(ruleKey.ToStringValue);
 }