Esempio n. 1
0
        public List <keyValuePair> getbanklist()
        {
            //select * from T_0119 where F_0119_03=2 order by F_0119_04
            List <keyValuePair> listKv = new List <keyValuePair>();
            SqlAgent            sa     = new SqlAgent(SysConfiguration.GetErpSqlConn());

            sa.addSelect("F_0119_01,F_0119_02");
            sa.addCondition("F_0119_03", 2, CompareType.Equal, LogicType.none, "");
            sa.addOrder("F_0119_04", true);
            DataTable bankDT = sa.select("T_0119");

            if (bankDT != null && bankDT.Rows.Count > 0)
            {
                foreach (DataRow dr in bankDT.Rows)
                {
                    keyValuePair kv = new keyValuePair();
                    kv.key   = dr["F_0119_01"].ToString();
                    kv.value = dr["F_0119_02"].ToString();
                    if (!listKv.Contains(kv))
                    {
                        listKv.Add(kv);
                    }
                }
            }
            return(listKv);
        }
Esempio n. 2
0
        private AdminJsonStr getloginUser()
        {
            AdminJsonStr model = new AdminJsonStr();
            keyValuePair kv    = new keyValuePair();

            if (UserPrincipal.current != null)
            {
                kv.key      = UserPrincipal.current.SubbranchID;
                kv.value    = UserPrincipal.current.UserName;
                model.data  = kv;
                model.count = 1;
            }
            else
            {
                model.code = 1;
                model.msg  = "你还没有登录,请重新登录。";
            }
            return(model);
        }
Esempio n. 3
0
 public STBL(STBL s)
 {
     this.magic = new char[4] {
         s.magic[0], s.magic[1], s.magic[2], s.magic[3]
     };
     this.version = s.version;
     this.unk     = new byte[2] {
         s.unk[0], s.unk[1]
     };
     this.count = s.count;
     this.unk2  = new byte[6] {
         s.unk2[0], s.unk2[1], s.unk2[2], s.unk2[3], s.unk2[4], s.unk2[5]
     };
     this.v5size      = s.v5size;
     this.keyTextPair = new List <keyValuePair>();
     for (int i = 0; i < this.count; i++)
     {
         keyValuePair tmp = new keyValuePair(s.keyTextPair[i]);
         this.keyTextPair.Add(tmp);
     }
 }
Esempio n. 4
0
 internal keyValuePair(keyValuePair p)
 {
     this.key  = p.key;
     this.text = String.Copy(p.text);
 }