Beispiel #1
0
        public List <string> searchbyname(string name)
        {
            idlist.Clear();
            List <string> anamelist = new List <string>();
            //CacheSysList list = User.ADBK.ListByName(adbksrc.conn,name);
            IRISList list = (IRISList)iris.ClassMethodIRISList("User.ADBK", "ListByName", name);

            //for (int i = 0; i < list.Count; i++)
            for (int i = 1; i < list.Count(); i++)
            {
                //reader.MoveNext();
                //string id = reader.Current.ToString().Split(' ')[0].ToString();
                if (list.Get(i).GetType() == typeof(string))
                {
                    id = list.Get(i).ToString().Split(' ')[0].ToString();
                }
                else
                {
                    id = System.Text.Encoding.ASCII.GetString((byte[])list.Get(i)).Split(' ')[0].ToString();
                }

                if (id == "no")
                {
                    break;
                }
                //string aname = reader.Current.ToString().Split(' ')[1].ToString();
                string aname = list.Get(i).ToString().Split(' ')[1].ToString();
                anamelist.Add(aname);
                idlist.Add(id);
            }
            return(anamelist);
        }
Beispiel #2
0
        public void save(string id)
        {
            //CacheSysList adbk;
            IRISList adbk;
            string   newid        = "";
            string   errormessage = "";
            string   aparams;

            try
            {
                //adbk = new CacheSysList(Encoding.Unicode,true);
                adbk = new IRISList();
                //adbk.Add(id.ToString());
                //adbk.Add(Name.ToString());
                //adbk.Add(Street.ToString());
                //adbk.Add(City.ToString());
                //adbk.Add(ZipCode.ToString());
                //adbk.Add(dob.ToString());
                //adbk.Add(HomePhone.ToString());
                //adbk.Add(WorkPhone.ToString());

                aparams = id.ToString() + (char)(1) + Name.ToString() + (char)1 + Street.ToString();
                aparams = aparams + (char)1 + City.ToString() + (char)1 + ZipCode.ToString();
                aparams = aparams + (char)1 + dob.ToString() + (char)1 + HomePhone.ToString();
                aparams = aparams + (char)1 + WorkPhone.ToString() + (char)1 + newflag.ToString();
                //bool? status = User.ADBK.File(adbksrc.conn,adbk,newflag,ref errormessage,ref newid);
                IRISList result = (IRISList)iris.ClassMethodIRISList("User.ADBK", "FileWapper", aparams);
                errormessage = result.Get(1).ToString();
                newid        = result.Get(2).ToString();
                //if (status == false)
                //if (errormessage != "ok")
                if (errormessage != "成功")
                {
                    MessageBox.Show("更新エラー " + errormessage);
                    return;
                }

                if (newflag == true)
                {
                    //adbk = User.ADBK.GetInstanceById(adbksrc.conn, newid);
                    adbk = (IRISList)iris.ClassMethodIRISList("User.ADBK", "GetInstanceById", newid);


                    //if (adbk.Count == 1)
                    if (adbk.Count() == 1)
                    {
                        MessageBox.Show("インスタンスオープンエラー idが存在しません");
                        return;
                    }

                    updatedatamodel(adbk);
                }
            }
            catch (Exception err)
            {
                MessageBox.Show("保存エラー " + err.Message);
            }
        }
Beispiel #3
0
        public void searchbyid(string aid)
        {
            try
            {
                //CacheSysList adbk = User.ADBK.GetInstanceById(adbksrc.conn,id);
                IRISList adbk = (IRISList)iris.ClassMethodIRISList("User.ADBK", "GetInstanceById", aid);

                //CacheSysList adbk = User.ADBK.GetInstanceById(adbksrc.conn,id);

                //if (adbk.Count == 1)
                if (adbk.Count() == 1)
                {
                    MessageBox.Show("インスタンスオープンエラー idが存在しません");
                    return;
                }

                updatedatamodel(adbk);
            }
            catch (Exception err)
            {
                MessageBox.Show("インスタンスオープンエラー " + err.Message);
            }
        }