Insert() публичный Метод

public Insert ( int index, Object value ) : void
index int
value Object
Результат void
Пример #1
0
            /// <summary> Remove the given seqno and resize or partition groups as
            /// necessary. The algorithm is as follows:<br>
            /// i. Find the group with low <= seqno <= high
            /// ii. If seqno == low,
            /// a. if low == high, then remove the group
            /// Adjust global low. If global low was pointing to the group
            /// deleted in the previous step, set it to point to the next group.
            /// If there is no next group, set global low to be higher than
            /// global high. This way the entry is invalidated and will be removed
            /// all together from the pending msgs and the task scheduler
            /// iii. If seqno == high, adjust high, adjust global high if this is
            /// the group at the tail of the list
            /// iv. Else low < seqno < high, break [low,high] into [low,seqno-1]
            /// and [seqno+1,high]
            ///
            /// </summary>
            /// <param name="seqno">the sequence number to remove
            /// </param>
            public virtual void  remove(long seqno)
            {
                int  i;
                long loBound = -1;
                long hiBound = -1;

                lock (this)
                {
                    for (i = 0; i < list.Count; i += 2)
                    {
                        loBound = (long)list[i];
                        hiBound = (long)list[i + 1];

                        if (seqno < loBound || seqno > hiBound)
                        {
                            continue;
                        }
                        break;
                    }
                    if (i == list.Count)
                    {
                        return;
                    }

                    if (seqno == loBound)
                    {
                        if (loBound == hiBound)
                        {
                            list.RemoveAt(i);
                            list.RemoveAt(i);
                        }
                        else
                        {
                            list[i] = ++loBound;
                        }

                        if (i == 0)
                        {
                            low = list.Count == 0 ? high + 1:loBound;
                        }
                    }
                    else if (seqno == hiBound)
                    {
                        list[i + 1] = --hiBound;
                        if (i == list.Count - 1)
                        {
                            high = hiBound;
                        }
                    }
                    else
                    {
                        list[i + 1] = seqno - 1;

                        list.Insert(i + 2, hiBound);
                        list.Insert(i + 2, seqno + 1);
                    }
                }
            }
Пример #2
0
 public static void SwapPosition(ArrayList lista, Object node1, Object node2)
 {
     int exp1idx = lista.IndexOf(node1);
     int exp2idx = lista.IndexOf(node2);
     lista.RemoveAt(exp1idx);
     lista.Insert(exp1idx, node2);
     lista.RemoveAt(exp2idx);
     lista.Insert(exp2idx, node1);
 }
Пример #3
0
        /// <summary>
        /// Deletes a List of Strings from the CSV File
        /// </summary>
        /// <param name="DeleteItems"></param>
        public void Delete(List<string> DeleteItems)
        {
            //SaveToFile
            try
            {
                ArrayList temp = new ArrayList();
                ///reads the file
                ///adds it to the array
                StreamReader inputStream = File.OpenText(oldLocal);
                string line;
                line = inputStream.ReadLine();
                for (int i = 0; line != null; i++)
                {
                    bool ignore = false;
                    foreach (string deleteItem in DeleteItems)
                    {
                        string[] breakUp = line.Split(',');
                        string itemName = breakUp[0] + "/" + breakUp[3];
                        if (itemName.CompareTo(deleteItem) == 0)
                        {
                            try
                            {
                                File.Delete(breakUp[4]);
                                temp.Insert(i, "");
                                ignore = true;
                                break;
                            }
                            catch
                            {
                                MessageBox.Show("File :" + breakUp[0] + " " + breakUp[3] + " is in use. Close file before deleting");
                            }

                        }
                    }
                    if (!ignore)
                    {
                        temp.Insert(i, line);
                    }
                    line = inputStream.ReadLine();
                }
                inputStream.Close();

                StreamWriter outputStream = File.CreateText(oldLocal);
                for (int g = 0; g < temp.Count; g++)
                {
                    if (temp[g] != null && temp[g] != "")
                    {
                        outputStream.WriteLine(temp[g]);
                    }
                }
                outputStream.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show("CSV ERROR: " + e);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //1. create empty ArrayList
            ArrayList al = new ArrayList();

            //2. add element into array list
            al.Add("Dog");
            al.Add("Cat");
            al.Add("Elephant");
            al.Add("Lion");
            al.Add("Cat");
            al.Add("Platypus");

            //3. bind above arrayList to first list box
            lbOriginal.DataSource = al;
            lbOriginal.DataBind();

            //4. change (insert -> remove ->remove)
            al.Insert(1, "Chicken~~~");
            al.Remove("Cat");
            al.RemoveAt(0);

            //5. bind the result into second list box
            lbChanged.DataSource = al;
            lbChanged.DataBind();
        }
Пример #5
0
        protected virtual ArrayList AddCheckBoxColumn(ICollection columnList)
        {
            ArrayList list = new ArrayList(columnList);

            // Determine the check state for the header checkbox
            string shouldCheck = "";
            string checkBoxID = String.Format(CheckBoxColumHeaderID, ClientID);
            string checkBoxName = String.Format(CheckBoxColumHeaderName, UniqueID);

            if (IsTitleCheckBoxChecked)
                shouldCheck = "checked=\"checked\"";

            // Create a new custom CheckBoxField object
            InputCheckBoxField field = new InputCheckBoxField(RowIdPropertyName);
            field.ItemStyle.Width = new Unit("16px");
            field.HeaderText = String.Format(CheckBoxColumHeaderTemplate, checkBoxID, checkBoxName, shouldCheck, ClientJSObjectName);
            field.ReadOnly = true;

            // Insert the checkbox field into the list at the specified position
            if (CheckBoxColumnIndex > list.Count)
            {
                // If the desired position exceeds the number of columns
                // add the checkbox field to the right. Note that this check
                // can only be made here because only now we know exactly HOW
                // MANY columns we're going to have. Checking Columns.Count in the
                // property setter doesn't work if columns are auto-generated
                list.Add(field);
                CheckBoxColumnIndex = list.Count - 1;
            }
            else
                list.Insert(CheckBoxColumnIndex, field);

            // Return the new list
            return list;
        }
Пример #6
0
        private string Breaker(ArrayList Cell_String)
        {
            for (int i = 1; i < Cell_String.Count; i++)
            {
                if (Fun_Class.IsFunction(Cell_String[i].ToString()))
                {
                    int found = 1;
                    int start = i + 1;

                    while (found != 0)
                    {
                        start++;
                        if (Cell_String[start].ToString().Equals("("))
                            found++;
                        if (Cell_String[start].ToString().Equals(")"))
                            found--;
                    }
                    ArrayList atemp = new ArrayList(Cell_String.GetRange(i, start - i + 1));
                    Cell_String.RemoveRange(i, start - i + 1);
                    Cell_String.Insert(i, Breaker(atemp));
                }
            }

            //PrintArrayList(Cell_String);
            //System.Console.WriteLine(Cell_String[0].ToString());

            return Fun_Class.CallFunction(Cell_String);
        }
        public void InsertUpdateProfessionName(ArrayList Prof)
        {

            ProfessionMasterStoredProcedure objprof = new ProfessionMasterStoredProcedure();
            Prof.Insert(2, Session["usersid"].ToString());
            objprof.InsertUpdateProfessionName(Prof);
        }
        public void InsertUpdateProfileInfo(ArrayList Profile)
        {
            UserProfileStoredProcedure objeditprofile = new UserProfileStoredProcedure();
            Profile.Insert(14, Session["usersid"].ToString());
            objeditprofile.InsertUpdateProfileInfo(Profile);

        }
Пример #9
0
        static void Main(string[] args)
        {
            ArrayList a = new ArrayList();
            a.Add(123);
            a.Add("BARD");
            a.Add(34.689);
            a.Insert(2, 'A');
            a.Remove(123);
            a.RemoveAt(2);
            foreach (Object o in a)
            {
                Console.WriteLine(o.ToString());
            }

            //Student s = new Student();
            //s.GetData();
            //a.Add(s);
            //foreach (Object o in a)
            //{
            //    if (o.GetType().ToString() == "ArrayListSample.Student")
            //    {
            //        Student s1 = (Student)o;
            //        s1.ShowData();
            //    }
            //}
            //Console.WriteLine("No of elements are:" +a.Count);

            Console.Read();
        }
        public void InsertUpdateFromMaster(ArrayList From)
        {

            CRM.DataAccess.AdministratorEntity.FromMasterStoredProcedure objfrom = new CRM.DataAccess.AdministratorEntity.FromMasterStoredProcedure();
            From.Insert(3, Session["usersid"].ToString());
            objfrom.InsertUpdateFromMaster(From);
        }
        public void InsertUpdateTargetList(ArrayList Target)
        {

            TargetListStoredProcedure objinserttarget = new TargetListStoredProcedure();
            Target.Insert(7, Session["usersid"].ToString());
            objinserttarget.InsertUpdateTargetList(Target);
        }
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Load Protal Definition and the current Tab
            PortalDefinition pd = PortalDefinition.Load();
            PortalDefinition.Tab currentTab = pd.GetTab(Request["TabRef"]);

            // Great, we are a top level Tab
            if(currentTab.parent == null) return;

            ArrayList tabList = new ArrayList();
            while(currentTab != null)
            {
                DisplayTabItem dt = new DisplayTabItem();
                tabList.Insert(0, dt);

                dt.m_Text = currentTab.title;
                dt.m_URL = Portal.API.Config.GetTabURL(currentTab.reference);

                // one up...
                currentTab = currentTab.parent;
            }

            // Bind Repeater
            tabpath.DataSource = tabList;
            tabpath.DataBind();
        }
Пример #13
0
        public void Test(int arg)
        {
            ArrayList items = new ArrayList();
            items.Add(1);
            items.AddRange(1, 2, 3);
            items.Clear();
            bool b1 = items.Contains(2);
            items.Insert(0, 1);
            items.InsertRange(1, 0, 5);
            items.RemoveAt(4);
            items.RemoveRange(4, 3);
            items.Remove(1);
            object[] newItems = items.GetRange(5, 2);
            object[] newItems2 = items.GetRange(5, arg);

            List<int> numbers = new List<int>();
            numbers.Add(1);
            numbers.AddRange(1, 2, 3);
            numbers.Clear();
            bool b2 = numbers.Contains(4);
            numbers.Insert(1, 10);
            numbers.InsertRange(2, 10, 3);
            numbers.RemoveAt(4);
            numbers.RemoveRange(4, 2);
            int[] newNumbers = items.GetRange(5, 2);
            int[] newNumbers2 = items.GetRange(5, arg);

            string[] words = new string[5];
            words[0] = "hello";
            words[1] = "world";
            bool b3 = words.Contains("hi");
            string[] newWords = words.GetRange(5, 2);
            string[] newWords2 = words.GetRange(5, arg);
        }
        public void InsertUpdateEvent(ArrayList Event)
        {

            CRM.DataAccess.AdministratorEntity.EventStoredProcedure objinsertevent = new CRM.DataAccess.AdministratorEntity.EventStoredProcedure();
            Event.Insert(3, Session["usersid"].ToString());
            objinsertevent.InsertUpdateEventMaster(Event);
        }
Пример #15
0
 private void SaveButton_Click(object sender, EventArgs e)
 {
     if (SubjectBox.Text.Length == 0)
     {
         MessageBox.Show("Cannot proceed with empty name");
         return;
     }
     ArrayList list = new ArrayList((string[])Host.SubjectList.DataSource);
     list.Sort();
     int id = list.BinarySearch(SubjectBox.Text);
     if (id >= 0)
     {
         MessageBox.Show("Subject with that name already exists!");
         return;
     }
     id = ~id;
     list.Insert(id, SubjectBox.Text);
     string[] n = new string[list.Count];
     list.CopyTo(n);
     Host.SubjectBox2.AutoCompleteCustomSource.Add(SubjectBox.Text);
     Host.SubjectList.DataSource = n;
     Host.RenewSubjectList();
     Host.SubjectList.SelectedItem = SubjectBox.Text;
     this.Close();
 }
Пример #16
0
        protected void myGrid_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType != DataControlRowType.DataRow)
            {
                return;
            }
            DropDownList myDropdown = (DropDownList)e.Row.FindControl("myDropdown");
               //  List<Customer> customerList = new List<Customer>(){
               //      new Customer(){Name="jambor" ,Age="1"},
               //      new Customer(){Name="yao" ,Age="1"},
               //};
            //myDropdown.DataSource = ArrayList;
            //myDropdown.DataTextField = "Name";
            //myDropdown.DataValueField = "Age";
            //myDropdown.DataBind();
            ArrayList list = new ArrayList();
            list.Add("none");
            list.Add("Canada Post");
            list.Add("UPS");

            list.Insert(1, "FedEx");

            myDropdown.DataSource = list;
            myDropdown.DataBind();
        }
Пример #17
0
        private void button3_Click(object sender, EventArgs e)
        {
            ArrayList arr = new ArrayList();
            arr.Add(10);
            arr.Add(20); //To add a new element at the end of collection
            arr.Add(30);
            arr.Add(40);
            arr.Add(50);
            arr.Add(60);
            arr.Add(70);
            arr.Add(80);
            arr.Add(90);
            arr[3] = 400; //To overwrite the value
            MessageBox.Show(arr.Capacity.ToString());
            arr.Insert(3, 1000);//insert in the middle
            //shift the other elements =>index,value
            foreach (object obj in arr)
            {
                listBox3.Items.Add(obj.ToString());
            }

            arr[12] = 10; //Runtime error

            arr.Remove(10);  //remove 10 <=value
            arr.RemoveAt(1); //remove element at index 1 <=index
        }
        public void InsertUpdateBankName(ArrayList bank)
        {

            BankMasterStoredProcedure objbank = new BankMasterStoredProcedure();
            bank.Insert(2, Session["usersid"].ToString());
            objbank.InsertUpdateBankName(bank);
        }
Пример #19
0
 public static void Choose(string source, ArrayList Al_r, ArrayList Al_h, int[] Points)
 {
     int nums = 0;
     int totalNums = 0;
     StreamWriter sw = new StreamWriter(source, false, System.Text.Encoding.Default);
     foreach (Object o in Al_r)
     {
         Al_h.Insert(0, o.ToString());
     }
     for (int i = 0; i < Points.Length; i++)
     {
         sw.WriteLine(Points[i] + " : ");
         for (int j = Al_h.Count - 1; j >= 0; j -- )
         {
             if (j % Points[i] == 0)
             {
                 sw.WriteLine(Al_h[j].ToString().Substring(6));
                 nums += 1;
             }
         }
         sw.WriteLine("条数 : " + nums);
         sw.WriteLine();
         totalNums += nums;
         nums = 0;
     }
     sw.WriteLine();
     sw.WriteLine("总条数 : " + totalNums);
     sw.Close();
 }
        private void ArrayListTest()
        {
            ArrayList list = new ArrayList();
             list.AddRange(
            new Car[]
               {
                  CAR_BANK[0],
                  CAR_BANK[1],
                  CAR_BANK[2]
               });
             Console.WriteLine("Number of cars = {0}", list.Count);

             foreach ( Car car in list )
            car.Display();
             Console.WriteLine();

             list.Insert( 2, CAR_BANK[3] );

             foreach (Car car in list)
            car.Display();
             Console.WriteLine();

             list[0] = CAR_BANK[4];

             foreach (Car car in list)
            car.Display();
        }
Пример #21
0
        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="PageSize">分页个数</param>
        /// <param name="PageIndex">当前分页号</param>
        /// <param name="strWhere">条件</param>
        /// <param name="cmdParms">条件参数</param>
        /// <param name="orderColType">排序字符串</param>
        /// <param name="Columns">赛选字段</param>
        /// <returns></returns>
        public static ArrayList GetPageList(int PageSize, int PageIndex, string strWhere, SqlParameter[] cmdParms, string orderColType, string Columns)
        {
            ArrayList Arr = new ArrayList();

            Arr.Add(typeof(EntityObject).Name.ToString2());
            Arr.Add("PageList");
            Arr.Add(PageSize);
            Arr.Add(PageIndex);
            Arr.Add(strWhere);
            Arr.Add(GetSqlParametersString(cmdParms));
            Arr.Add(orderColType);
            Arr.Add(Columns);

            object obj = AddModelWebCache(Arr.JArrayListToString(Sign, true), null);

            if (obj == null)
            {
                object obj2 = InvokeMethod("GetPageList", new object[] { PageSize, PageIndex, SQL.DealSQL <EntityObject>(strWhere), cmdParms, orderColType, Columns });

                System.Collections.ArrayList _ArrayList = (System.Collections.ArrayList)obj2;
                _ArrayList.Insert(0, ((DataSet)_ArrayList[0]).Tables[0].ToList <EntityObject>());

                return((System.Collections.ArrayList)AddModelWebCache(Arr.JArrayListToString(Sign, true), _ArrayList));
            }
            else
            {
                return((System.Collections.ArrayList)obj);
            }
        }
        public void InsertUpdateAgentName(ArrayList Agent)
        {

            AgentMasterStoredProcedure objagent = new AgentMasterStoredProcedure();
            Agent.Insert(13, Session["usersid"].ToString());
            objagent.InsertUpdateAgentName(Agent);
        }
Пример #23
0
        public void InsertUpdateEmailConfig(ArrayList Config)
        {

            CRM.DataAccess.AdministratorEntity.EmailConfigStoredProcedure objemailConfig = new CRM.DataAccess.AdministratorEntity.EmailConfigStoredProcedure();
            Config.Insert(5, Session["usersid"].ToString());
            objemailConfig.InsertUpdateEmailConfig(Config);
        }
Пример #24
0
 public TinhBieuThuc(string input)
 {
     PhepTinh = new PhepTinh();
     BieuThuc = new ArrayList();
     input = input.Replace(" ", "") + ")";
     string temp = "";
     int tag = 0;
     while (input != "") {
         bool isDigit = isNumber(input[0])
             ||
             (tag == 0 && input[0] == '-' && char.IsDigit(input[1]));
         if (isDigit) {
             tag = 1;
             do {
                 temp += input[0].ToString();
                 input = input.Substring(1);
             } while (isNumber(input[0]) && input[0] != '-');
             BieuThuc.Add(double.Parse(temp));
             temp = "";
         }
         else {
             tag = 0;
             BieuThuc.Add(input[0].ToString());
             input = input.Substring(1);
         }
     }
     for (int i = 0; i < BieuThuc.Count - 1; i++) {
         if (isDouble(BieuThuc[i]) && isDouble(BieuThuc[i + 1])) {
             BieuThuc.Insert(i + 1, "+");
         }
     }
 }
Пример #25
0
 static void Main(string[] args)
 {
     ArrayList al = new ArrayList();
     al.Add("string");
     al.Add('B');
     al.Add(10);
     al.Add(DateTime.Now);
     ArrayList bl = new ArrayList(5);
     al.Remove('B');
     // 从al中删除第一个匹配的对象,如果al中不包含该对象,数组保持不变,不引发异常。
     al.Remove('B');
     al.RemoveAt(0);
     al.RemoveRange(0, 1);
     bl.Add(1);
     bl.Add(11);
     bl.Add(111);
     bl.Insert(4, 1111);
     int[] inttest = (int[])bl.ToArray(typeof(int));
     foreach(int it in inttest)
         Console.WriteLine(it);
     int[] inttest2 = new int[bl.Count];
     bl.CopyTo(inttest2);
     ArrayList cl = new ArrayList();
     cl.Add(1);
     cl.Add("Hello, World!");
     object[] ol = (object[])cl.ToArray(typeof(object));
     // stringp[] os = (string[])cl.ToArray(typeof(string));
     Console.WriteLine("The Capacity of new ArrayList: {0}", al.Capacity);
 }
Пример #26
0
        protected void SortUp(Message message)
        {
            Assert.ArgumentNotNull(message, "message");
            if (this.SelectedIndex <= 0)
            {
                return;
            }
            LayoutDefinition layoutDefinition = DeviceEditorForm.GetLayoutDefinition();
            DeviceDefinition device           = layoutDefinition.GetDevice(this.DeviceID);

            System.Collections.ArrayList renderings = device.Renderings;
            if (renderings == null)
            {
                return;
            }
            RenderingDefinition renderingDefinition = renderings[this.SelectedIndex] as RenderingDefinition;

            if (renderingDefinition == null)
            {
                return;
            }
            renderings.Remove(renderingDefinition);
            renderings.Insert(this.SelectedIndex - 1, renderingDefinition);
            this.SelectedIndex--;
            DeviceEditorForm.SetDefinition(layoutDefinition);
            this.Refresh();
        }
        public void fun1()
        {
            ArrayList a1 = new ArrayList();
            a1.Add(1);
            a1.Add('c');
            a1.Add("string1");

            ArrayList al2 = new ArrayList();
            al2.Add('a');
            al2.Add(5);

            int n = (int)a1[0];
            Console.WriteLine(n);
            a1[0] = 20;
            Console.WriteLine(a1.Count);
            Console.WriteLine(a1.Contains(55));
            Console.WriteLine(a1.IndexOf(55));
            //int[] num = (int[])a1.ToArray();

            a1.Add(45);
            a1.Add(12);
            a1.Add(67);

            a1.Insert(1, "new value");
            //a1.AddRange(al2);
            a1.InsertRange(1, al2);
            a1.Remove("string1");
            a1.RemoveAt(2);
            a1.RemoveRange(0, 2);

            foreach (object o in a1)
            {
                Console.WriteLine(o.ToString());
            }
        }
Пример #28
0
         public void InsertUpdatecoachtype(ArrayList Coach)
         {

             CoachMaster objcoachtype = new CoachMaster();
             Coach.Insert(3, Session["usersid"].ToString());
             objcoachtype.InsertUpdatecoachtype(Coach);

         }
        public void InsertUpdateProductName(ArrayList Product)
        {

            ProductMasterStoredProcedure objproductname = new ProductMasterStoredProcedure();
            Product.Insert(2, Session["usersid"].ToString());
            objproductname.InsertUpdateProductName(Product);

        }
        public void InsertUpdateCustomerType(ArrayList Ctype)
        {

            CustomerTypeStoredProcedure objctype = new CustomerTypeStoredProcedure();
            Ctype.Insert(3, Session["usersid"].ToString());
            objctype.InsertUpdateCustomerType(Ctype);

        }
        public void InsertUpdateSupplierBankAccount(ArrayList SupplierAccount)
        {

            CRM.DataAccess.AdministratorEntity.SupplierBankAccountStoredProcedure objinsertbankdetail = new CRM.DataAccess.AdministratorEntity.SupplierBankAccountStoredProcedure();
            SupplierAccount.Insert(9, Session["usersid"].ToString());
            objinsertbankdetail.InsertUpdateSupplierBank(SupplierAccount);

        }
        public void InsertUpdateForeignCurrencyAgent(ArrayList CurrencyAgent)
        {

            ForeignCurrencyAgentStoredProcedure objCurrencyAgent = new ForeignCurrencyAgentStoredProcedure();
            CurrencyAgent.Insert(6, Session["usersid"].ToString());
            objCurrencyAgent.InsertUpdateForeignCurrencyAgent(CurrencyAgent);

        }
        public void InsertUpdateAgent(ArrayList agent)
        {

           CRM.DataAccess.AdministratorEntity.AgentCommisionMaster objagent = new CRM.DataAccess.AdministratorEntity.AgentCommisionMaster();
            agent.Insert(5, Session["usersid"].ToString());
           objagent.InsertUpdateAgentcommision(agent);
             
        }
Пример #34
0
        public void Insert(int index, TileListItem value)
        {
            // TODO:  Add ControlListView.Insert implementation
            TileListItem lItem = (TileListItem)value;

            PrepareItemToAdd(lItem);
            this.Controls.Add(lItem);
            controlList.Insert(index, value);
            ReCalculateItems();
        }
Пример #35
0
        private System.Collections.ArrayList AddNullItem(System.Collections.ArrayList toBeBindedList, out bool changedList)
        {
            object obj = GetNullItem();

            if ((toBeBindedList.Count >= 1) && (toBeBindedList[0] == obj))
            {
                changedList = false;
                return(toBeBindedList);
            }
            toBeBindedList.Insert(0, obj);
            changedList = true;
            return(toBeBindedList);
        }
 static public int Insert(IntPtr l)
 {
     try {
         System.Collections.ArrayList self = (System.Collections.ArrayList)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Object a2;
         checkType(l, 3, out a2);
         self.Insert(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #37
0
 static int Insert(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         System.Collections.ArrayList obj = (System.Collections.ArrayList)ToLua.CheckObject(L, 1, typeof(System.Collections.ArrayList));
         int    arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         object arg1 = ToLua.ToVarObject(L, 3);
         obj.Insert(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #38
0
        private void butDevicesDel_Click(object sender, System.EventArgs e)
        {
            if (this.dgvAllDevices.SelectedRows.Count == 0)
            {
                EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Dev_needselect, new string[0]));
                return;
            }
            DialogResult dialogResult = EcoMessageBox.ShowWarning(EcoLanguage.getMsg(LangRes.Dev_delCrm, new string[0]), MessageBoxButtons.OKCancel);

            if (dialogResult == DialogResult.Cancel)
            {
                return;
            }
            System.Collections.ArrayList arrayList = new System.Collections.ArrayList();
            for (int i = 0; i < this.dgvAllDevices.SelectedRows.Count; i++)
            {
                DataGridViewCellCollection cells = this.dgvAllDevices.SelectedRows[i].Cells;
                string value = cells["dgvtbcdeviceId"].Value.ToString();
                arrayList.Insert(0, value);
            }
            System.Collections.ArrayList allRack_NoEmpty = RackInfo.GetAllRack_NoEmpty();
            Program.IdleTimer_Pause(1);
            progressPopup progressPopup = new progressPopup("Information", 1, EcoLanguage.getMsg(LangRes.PopProgressMsg_delDev, new string[0]), null, new progressPopup.ProcessInThread(this.delDevicePro), arrayList, 0);

            progressPopup.ShowDialog();
            object return_V = progressPopup.Return_V;

            Program.IdleTimer_Run(1);
            int?num = return_V as int?;

            if (!num.HasValue || num < 0)
            {
                EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.OPfail, new string[0]));
            }
            System.Collections.ArrayList allRack_NoEmpty2 = RackInfo.GetAllRack_NoEmpty();
            EcoGlobalVar.gl_DevManPage.FlushFlg_RackBoard = 1;
            if (allRack_NoEmpty.Count == allRack_NoEmpty2.Count)
            {
                EcoGlobalVar.setDashBoardFlg(526uL, "", 66);
            }
            else
            {
                EcoGlobalVar.setDashBoardFlg(526uL, "", 65);
            }
            EcoGlobalVar.gl_DevManPage.FlushFlg_ZoneBoard = 1;
            this.changeTreeSelect("DevRoot");
        }
Пример #39
0
        protected override void OnLoad()
        {
            this.isAcross = true;
            this.isSort   = false;
            //this.Init();

            base.OnLoad();
            //设置时间范围
            DateTime now = DateTime.Now;
            DateTime dt  = new DateTime(DateTime.Now.Year, 1, 1);

            this.dtpBeginTime.Value = dt;

            //填充数据、费用类别
            Neusoft.HISFC.BizProcess.Integrate.Manager manager = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            System.Collections.ArrayList constantList          = manager.GetConstantList("FEECODESTAT");
            foreach (Neusoft.HISFC.Models.Base.Const con in constantList)
            {
                cboReportCode.Items.Add(con);
            }
            if (cboReportCode.Items.Count > 0)
            {
                cboReportCode.SelectedIndex = 0;
                reportCode = ((Neusoft.HISFC.Models.Base.Const)cboReportCode.Items[0]).ID;
                reportName = ((Neusoft.HISFC.Models.Base.Const)cboReportCode.Items[0]).Name;
            }

            //填充数据、科室
            Neusoft.HISFC.Models.Base.Department allDept            = new Neusoft.HISFC.Models.Base.Department();
            System.Collections.ArrayList         alDeptconstantList = manager.QueryDeptmentsInHos(true);
            allDept.ID        = "%%";
            allDept.Name      = "全部";
            allDept.SpellCode = "QB";
            alDeptconstantList.Insert(0, allDept);
            this.cboDeptCode.AddItems(alDeptconstantList);
            if (cboDeptCode.Items.Count > 0)
            {
                cboDeptCode.SelectedIndex = 0;
                deptCode = this.cboDeptCode.Tag.ToString();
                deptName = this.cboDeptCode.Text;
            }
        }
Пример #40
0
    /// <summary>
    /// Converts the numeric value of this instance to its equivalent string representation in specified base.
    /// </summary>
    /// <param name="radix">Int radix between 2 and 36</param>
    /// <returns>A string.</returns>
    public string ToString(int radix)
    {
        if (radix < 2 || radix > 36)
        {
            throw new ArgumentOutOfRangeException("radix");
        }

        if (IsZero)
        {
            return("0");
        }

        BigInteger a        = this;
        bool       negative = a.IsNegative;

        a = Abs(this);

        BigInteger quotient;
        BigInteger remainder;
        BigInteger biRadix = new BigInteger(radix);

        const string charSet = "0123456789abcdefghijklmnopqrstuvwxyz";

        System.Collections.ArrayList al = new System.Collections.ArrayList();
        while (a.m_digits.DataUsed > 1 || (a.m_digits.DataUsed == 1 && a.m_digits[0] != 0))
        {
            Divide(a, biRadix, out quotient, out remainder);
            al.Insert(0, charSet [(int)remainder.m_digits [0]]);
            a = quotient;
        }

        string result = new String((char[])al.ToArray(typeof(char)));

        if (radix == 10 && negative)
        {
            return("-" + result);
        }

        return(result);
    }
        protected override void OnLoad()
        {
            this.Init();

            base.OnLoad();
            //设置时间范围
            DateTime now = DateTime.Now;
            DateTime dt  = new DateTime(DateTime.Now.Year, 1, 1);

            this.dtpBeginTime.Value = dt;

            //填充数据
            Neusoft.HISFC.BizProcess.Integrate.Manager manager = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            alpaykindConstantList = manager.QueryPactUnitAll();
            Neusoft.HISFC.Models.Base.Pact alpact = new Neusoft.HISFC.Models.Base.Pact();
            alpact.ID        = "ALL";
            alpact.Name      = "全部";
            alpact.SpellCode = "QB";
            alpaykindConstantList.Insert(0, alpact);
            this.neuComboBox1.AddItems(alpaykindConstantList);
            neuComboBox1.SelectedIndex = 0;
        }
Пример #42
0
        protected override void OnLoad()
        {
            this.isAcross = true;
            this.isSort   = false;
            //this.Init();

            base.OnLoad();

            //填充数据、医生
            Neusoft.HISFC.Models.Base.Employee allDoct    = new Neusoft.HISFC.Models.Base.Employee();
            System.Collections.ArrayList       alDoctList = managerIntegrate.QueryEmployee(Neusoft.HISFC.Models.Base.EnumEmployeeType.D);
            allDoct.ID        = "%%";
            allDoct.Name      = "全部";
            allDoct.SpellCode = "QB";
            alDoctList.Insert(0, allDoct);
            this.cboDoctCode.AddItems(alDoctList);
            if (cboDoctCode.Items.Count > 0)
            {
                cboDoctCode.SelectedIndex = 0;
                emplCode = this.cboDoctCode.Tag.ToString();
            }
        }
Пример #43
0
		private void button4_Click(object sender, System.EventArgs e)
		{
			string str_SerialNumber;
			string str_nb1,str_nb2,str_nb3,str_nb4,str_nb5;
            string miWen1=textBox8.Text;
			if (textBox8.Text.Trim()=="")
			{
				MessageBox.Show("机器码不能为空");
				return;
			}
			DESEncryptor dese2=new DESEncryptor();
			dese2.InputString=miWen1;
			dese2.DecryptKey="lhgynkm0";
			dese2.DesDecrypt();
			string mingWen1=dese2.OutString;
			WL(mingWen1);
			dese2=null;

          	str_SerialNumber=mingWen1;
			str_nb1=str_SerialNumber.Substring(2,1);
			str_nb2=str_SerialNumber.Substring(3,1);
			str_nb3=str_SerialNumber.Substring(4,1);
			str_nb4=str_SerialNumber.Substring(5,1);
			str_nb5=str_SerialNumber.Substring(6,1);
			label1.Text=mingWen1;

			int num;
			System.Random random;
			System.Collections.ArrayList array;

			random= new Random();
			array=new System.Collections.ArrayList();
 
			//保存第一个数到 array 对象
			array.Add((int)random.Next(1000,9999));
 
			int i,j,m=1; 
			int n=0;
			string str0=null,str1;
			//循环取6不重复的数字
			while(m<6)
			{
				n=n+1;
				num=random.Next(1000,9999);
 
				//判断是否已经存在
				for(j=0;j<array.Count;j++)
				{
					//如果数列中的数字比随机数大,则该随机数为新数,插入到大数的前面
					if (num<(int)array[j])
					{
						array.Insert(j,num);
						m++;
					}
					//相等,则说明存在,跳出循环重新取数
					if(num==(int)array[j])
						break;
     
				}
				string str_num=num.ToString();
				if (n==1)
				{
					textBox1.Text=str_nb5 + num.ToString();
					str1=str_nb5 + num.ToString();
					str0=str0+str1;
				}
				if (n==2)
				{
					string str_num20,str_num21;
					str_num20=str_num.Substring(0,1);
					str_num21=str_num.Substring(1,3);
					textBox2.Text=str_num20 + str_nb4 + str_num21;
					str1=str_num20 + str_nb4 + str_num21;
					str0=str0+"-"+str1;
				}
				if (n==3)
				{
					string str_num30,str_num31;
					str_num30=str_num.Substring(0,2);
					str_num31=str_num.Substring(2,2);
					textBox3.Text=str_num30 + str_nb3 + str_num31;
					str1=str_num30 + str_nb3 + str_num31;
					str0=str0+"-"+str1;
				}
				if (n==4)
				{
					string str_num40,str_num41;
					str_num40=str_num.Substring(0,3);
					str_num41=str_num.Substring(3,1);
					textBox4.Text=str_num40 + str_nb2 + str_num41;
					str1=str_num40 + str_nb2 + str_num41;
					str0=str0+"-"+str1;
				}
				if (n==5)
				{
					textBox5.Text=num.ToString() + str_nb1;
					str1=num.ToString() + str_nb1;
					str0=str0+"-"+str1;
				}
				//加密
				DESEncryptor dese=new DESEncryptor();
                dese.InputString ="ynkm"+ mingWen1 + "dxkj";
				dese.EncryptKey="lhgynkm0";
				dese.DesEncrypt();
				string miWen=dese.OutString;
				WL(miWen);
				dese=null;
				textBox6.Text=miWen;
                //解密
				DESEncryptor dese1=new DESEncryptor();
				dese1.InputString=miWen;
				dese1.DecryptKey="lhgynkm0";
				dese1.DesDecrypt();
				string mingWen=dese1.OutString;
				WL(mingWen);
				dese1=null;
				textBox7.Text=mingWen;
				//所有的数都比随机数小……
				if(j==array.Count )
				{
					array.Add(num);
					m++; 
				}
			}
   
			for(i=0;i<6;i++)
			{
				Console.Write(array[i].ToString() + " ");
			}
			Console.Read();
 
		}
Пример #44
0
 public void Insert(int index, PercentChartItem pi)
 {
     m_Entries.Insert(index, pi);
     m_Owner.ViewRefresh();
 }
Пример #45
0
        //---------------------------------------------------------------------

        public static string RunEstimate(System.Collections.ArrayList Exp)
        {
            try
            {
                int k = 0, a, b, res;
                while (Exp.Count > 1)
                {
                    if (!(("*".Equals(Exp[k])) || ("/".Equals(Exp[k])) || ("+".Equals(Exp[k])) || (("-".Equals(Exp[k])) || ("mod".Equals(Exp[k])))))
                    {
                        if ("m".Equals(Exp[k]) || ("p".Equals(Exp[k])))
                        {
                            a = int.Parse(Exp[k - 1].ToString());
                            if ("p".Equals(Exp[k]))
                            {
                                res = a;
                            }
                            else
                            {
                                res = int.Parse(MathLibrary.IABS(a).ToString());
                                if (MathLibrary._lastError.Length > 0)
                                {
                                    ShowMessege = true;
                                    expression  = MathLibrary._lastError;
                                    return(expression);
                                }
                            }
                            Exp.RemoveAt(k);
                            Exp.RemoveAt(k - 1);

                            Exp.Insert(k - 1, res.ToString());
                            k -= 1;
                        }
                        k++;
                    }
                    else
                    {
                        try
                        {
                            a = int.Parse(Exp[k - 2].ToString());
                            b = int.Parse(Exp[k - 1].ToString());
                        }
                        catch
                        {
                            ShowMessege = true;
                            expression  = "error 06";
                            return(expression);
                        }

                        switch (Exp[k].ToString())
                        {
                        case "+":
                            res = MathLibrary.Add(a, b);
                            if (MathLibrary._lastError.Length > 0)
                            {
                                ShowMessege            = true;
                                expression             = MathLibrary._lastError;
                                MathLibrary._lastError = "";
                                return(expression);
                            }
                            break;

                        case "-":
                            res = MathLibrary.Sub(a, b);
                            if (MathLibrary._lastError.Length > 0)
                            {
                                ShowMessege            = true;
                                expression             = MathLibrary._lastError;
                                MathLibrary._lastError = "";
                                return(expression);
                            }
                            break;

                        case "*":
                            res = MathLibrary.Mult(a, b);
                            if (MathLibrary._lastError.Length > 0)
                            {
                                ShowMessege            = true;
                                expression             = MathLibrary._lastError;
                                MathLibrary._lastError = "";
                                return(expression);
                            }
                            break;

                        case "/":
                            res = MathLibrary.Div(a, b);
                            if (MathLibrary._lastError.Length > 0)
                            {
                                ShowMessege            = true;
                                expression             = MathLibrary._lastError;
                                MathLibrary._lastError = "";
                                return(expression);
                            }
                            break;

                        case "mod":
                            res = MathLibrary.Mod(a, b);
                            if (MathLibrary._lastError.Length > 0)
                            {
                                ShowMessege            = true;
                                expression             = MathLibrary._lastError;
                                MathLibrary._lastError = "";
                                return(expression);
                            }
                            break;

                        default:
                            ShowMessege = true;
                            expression  = "error 03";
                            return(expression);
                        }
                        Exp.RemoveAt(k);
                        Exp.RemoveAt(k - 1);
                        Exp.RemoveAt(k - 2);
                        Exp.Insert(k - 2, res.ToString());
                        k -= 2;
                    }
                }
                return(Exp[0].ToString());
            }
            catch
            {
                ShowMessege = true;
                expression  = "error 03";
                return(expression);
            }
        }
Пример #46
0
 /// <seealso cref="org._3pq.jgrapht.traverse.CrossComponentIterator.encounterVertex(java.lang.Object,">
 /// org._3pq.jgrapht.Edge)
 /// </seealso>
 protected internal override void encounterVertex(System.Object vertex, Edge edge)
 {
     putSeenData(vertex, (System.Object)null);
     m_queue.Insert(m_queue.Count, vertex);
 }
        protected override void OnLoad()
        {
            this.Init();

            base.OnLoad();
            //设置时间范围
            DateTime now = DateTime.Now;
            DateTime dt  = new DateTime(DateTime.Now.Year, 1, 1);

            this.dtpBeginTime.Value = dt;

            //填充数据
            Neusoft.HISFC.BizProcess.Integrate.Manager manager = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            alpaykindConstantList = manager.QueryPactUnitAll();
            Neusoft.HISFC.Models.Base.Pact alpact = new Neusoft.HISFC.Models.Base.Pact();
            alpact.ID        = "ALL";
            alpact.Name      = "全部";
            alpact.SpellCode = "QB";
            alpaykindConstantList.Insert(0, alpact);
            this.neuComboBox1.AddItems(alpaykindConstantList);
            neuComboBox1.SelectedIndex = 0;


            alinstateConstantList = new ArrayList();
            #region 全部患者状态

            //全部
            Neusoft.HISFC.Models.Base.Const allinstate0 = new Neusoft.HISFC.Models.Base.Const();
            allinstate0.ID        = "QB";
            allinstate0.Name      = "全部";
            allinstate0.SpellCode = "QB";
            alinstateConstantList.Add(allinstate0);
            //住院登记
            Neusoft.HISFC.Models.Base.Const allinstate1 = new Neusoft.HISFC.Models.Base.Const();
            allinstate1.ID        = "ZYDJ";
            allinstate1.Name      = "住院登记";
            allinstate1.SpellCode = "ZYDJ";
            alinstateConstantList.Add(allinstate1);
            //病房接诊
            Neusoft.HISFC.Models.Base.Const allinstate2 = new Neusoft.HISFC.Models.Base.Const();
            allinstate2.ID        = "BFJZ";
            allinstate2.Name      = "病房接诊";
            allinstate2.SpellCode = "BFJZ";
            alinstateConstantList.Add(allinstate2);
            //出院登记
            Neusoft.HISFC.Models.Base.Const allinstate3 = new Neusoft.HISFC.Models.Base.Const();
            allinstate3.ID        = "CYDJ";
            allinstate3.Name      = "出院登记";
            allinstate3.SpellCode = "CYDJ";
            alinstateConstantList.Add(allinstate3);
            //出院结算
            Neusoft.HISFC.Models.Base.Const allinstate4 = new Neusoft.HISFC.Models.Base.Const();
            allinstate4.ID        = "CYJS";
            allinstate4.Name      = "出院结算";
            allinstate4.SpellCode = "CYJS";
            alinstateConstantList.Add(allinstate4);
            //预约出院
            Neusoft.HISFC.Models.Base.Const allinstate5 = new Neusoft.HISFC.Models.Base.Const();
            allinstate5.ID        = "YYCY";
            allinstate5.Name      = "预约出院";
            allinstate5.SpellCode = "YYCY";
            alinstateConstantList.Add(allinstate5);
            //无费退院
            Neusoft.HISFC.Models.Base.Const allinstate6 = new Neusoft.HISFC.Models.Base.Const();
            allinstate6.ID        = "WFTY";
            allinstate6.Name      = "无费退院";
            allinstate6.SpellCode = "WFTY";
            alinstateConstantList.Add(allinstate6);
            #endregion

            this.cbstate.AddItems(alinstateConstantList);
            cbstate.SelectedIndex = 0;
        }
Пример #48
0
        public void OutputHeader(UMC.Web.WebMeta header, int index)
        {
            if (this.OuterHeaders == null)
            {
                this.OuterHeaders = new Hashtable();;
            }

            var dic = header.GetDictionary();

            var em = dic.GetEnumerator();

            while (em.MoveNext())
            {
                var key = em.Key.ToString();
                if (key == "DataEvent")
                {
                    var value = em.Value;
                    if (this.OuterHeaders.ContainsKey(key))
                    {
                        var ats = new System.Collections.ArrayList();
                        var ts  = this.OuterHeaders[key];

                        if (ts is Array)
                        {
                            if (index == -1)
                            {
                                ats.AddRange((Array)ts);
                            }
                            else
                            {
                                ats.InsertRange(index, (Array)ts);
                            }
                        }
                        else
                        {
                            if (index == -1)
                            {
                                ats.Add(ts);
                            }
                            else
                            {
                                ats.Insert(index, ts);
                            }
                        }
                        if (value is Array)
                        {
                            if (index == -1)
                            {
                                ats.AddRange((Array)value);
                            }
                            else
                            {
                                ats.InsertRange(index, (Array)value);
                            }
                        }
                        else
                        {
                            if (index == -1)
                            {
                                ats.Add(value);
                            }
                            else
                            {
                                ats.Insert(index, value);
                            }
                        }
                        this.OuterHeaders[key] = ats.ToArray();
                    }
                    else
                    {
                        this.OuterHeaders[em.Key] = em.Value;
                    }
                }
                else
                {
                    this.OuterHeaders[em.Key] = em.Value;
                }
            }
        }
Пример #49
0
        protected override void OnLoad()
        {
            this.Init();

            base.OnLoad();
            //设置时间范围
            DateTime now = DateTime.Now;
            DateTime dt  = new DateTime(DateTime.Now.Year, 1, 1);

            this.dtpBeginTime.Value = dt;

            //填充数据
            Neusoft.HISFC.BizProcess.Integrate.Manager manager = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            alPersonconstantList = manager.QueryEmployeeAll();
            Neusoft.HISFC.Models.Base.Employee allPerson = new Neusoft.HISFC.Models.Base.Employee();
            allPerson.ID        = "%%";
            allPerson.Name      = "全部";
            allPerson.SpellCode = "QB";
            //cboPersonCode.Items.Insert(0, allPerson);
            alPersonconstantList.Insert(0, allPerson);
            this.cboPersonCode.AddItems(alPersonconstantList);
            cboPersonCode.SelectedIndex = 0;


            alCancelFlagConstantList = new ArrayList();

            #region 全部发票状态

            //全部
            Neusoft.HISFC.Models.Base.Const allCancelFlag0 = new Neusoft.HISFC.Models.Base.Const();
            allCancelFlag0.ID        = "QB";
            allCancelFlag0.Name      = "全部";
            allCancelFlag0.SpellCode = "QB";
            alCancelFlagConstantList.Add(allCancelFlag0);
            //有效
            Neusoft.HISFC.Models.Base.Const allCancelFlag1 = new Neusoft.HISFC.Models.Base.Const();
            allCancelFlag1.ID        = "YX";
            allCancelFlag1.Name      = "有效";
            allCancelFlag1.SpellCode = "YX";
            alCancelFlagConstantList.Add(allCancelFlag1);
            //全部废票(退费,重打,注销)
            Neusoft.HISFC.Models.Base.Const allCancelFlag2 = new Neusoft.HISFC.Models.Base.Const();
            allCancelFlag2.ID        = "QBFP";
            allCancelFlag2.Name      = "全部废票";
            allCancelFlag2.SpellCode = "QBFP";
            alCancelFlagConstantList.Add(allCancelFlag2);
            //退费
            Neusoft.HISFC.Models.Base.Const allCancelFlag3 = new Neusoft.HISFC.Models.Base.Const();
            allCancelFlag3.ID        = "TF";
            allCancelFlag3.Name      = "退费";
            allCancelFlag3.SpellCode = "TF";
            alCancelFlagConstantList.Add(allCancelFlag3);
            //重打
            Neusoft.HISFC.Models.Base.Const allCancelFlag4 = new Neusoft.HISFC.Models.Base.Const();
            allCancelFlag4.ID        = "CD";
            allCancelFlag4.Name      = "重打";
            allCancelFlag4.SpellCode = "CD";
            alCancelFlagConstantList.Add(allCancelFlag4);
            //注销
            Neusoft.HISFC.Models.Base.Const allCancelFlag5 = new Neusoft.HISFC.Models.Base.Const();
            allCancelFlag5.ID        = "ZX";
            allCancelFlag5.Name      = "注销";
            allCancelFlag5.SpellCode = "ZX";
            alCancelFlagConstantList.Add(allCancelFlag5);
            #endregion

            this.cboCancelFlag.AddItems(alCancelFlagConstantList);
            cboCancelFlag.SelectedIndex = 0;
        }
Пример #50
0
        protected override void OnLoad()
        {
            Neusoft.HISFC.BizProcess.Integrate.Manager manager = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            //发药人
            System.Collections.ArrayList       alPersonconstantList = manager.QueryEmployeeAll();
            Neusoft.HISFC.Models.Base.Employee allpeo_name          = new Neusoft.HISFC.Models.Base.Employee();
            allpeo_name.ID        = "ALL";
            allpeo_name.Name      = "全部";
            allpeo_name.SpellCode = "QB";

            neuComboBox2.Items.Add(allpeo_name);


            foreach (Neusoft.HISFC.Models.Base.Employee var in alPersonconstantList)
            {
                neuComboBox2.Items.Add(var);
            }

            alPersonconstantList.Insert(0, allpeo_name);
            this.neuComboBox2.alItems.AddRange(alPersonconstantList);

            if (neuComboBox2.Items.Count > 0)
            {
                neuComboBox2.SelectedIndex = 0;
                peo_name_code = ((Neusoft.HISFC.Models.Base.Employee)neuComboBox2.Items[0]).ID;
                peo_name_name = ((Neusoft.HISFC.Models.Base.Employee)neuComboBox2.Items[0]).Name;
            }


            ArrayList list = manager.GetConstantList(Neusoft.HISFC.Models.Base.EnumConstant.DRUGQUALITY);

            Neusoft.HISFC.Models.Base.Const obj = new Neusoft.HISFC.Models.Base.Const();
            obj.ID        = "ALL";
            obj.Name      = "全部";
            obj.SpellCode = "QB";
            obj.WBCode    = "WU";
            list.Add(obj);
            this.neuComboBox1.Items.Add(obj);
            foreach (Neusoft.HISFC.Models.Base.Const con in list)
            {
                neuComboBox1.Items.Add(con);
            }

            this.neuComboBox1.alItems.Add(obj);
            this.neuComboBox1.alItems.AddRange(list);

            if (neuComboBox1.Items.Count > 0)
            {
                neuComboBox1.SelectedIndex = 0;
                dr_type_code = ((Neusoft.HISFC.Models.Base.Const)neuComboBox1.Items[0]).ID;
                dr_type_name = ((Neusoft.HISFC.Models.Base.Const)neuComboBox1.Items[0]).Name;
            }

            #region  药品名称复值
            //list = new ArrayList();
            Neusoft.HISFC.BizLogic.Pharmacy.Item      phaManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();
            List <Neusoft.HISFC.Models.Pharmacy.Item> ListDrug   = phaManager.QueryItemList();
            //Object b = new Object();
            for (int i = 0; i < ListDrug.Count; i++)
            {
                //b = ListDrug[i];
                //AllDrugList.Insert(0, b);
                neuComboBox3.Items.Add(ListDrug[i]);
            }

            Neusoft.HISFC.Models.Pharmacy.Item obj2 = new Neusoft.HISFC.Models.Pharmacy.Item();
            obj2.ID   = "ALL";
            obj2.Name = "全部";

            neuComboBox3.Items.Insert(0, obj2);
            neuComboBox3.alItems.Add(obj2);
            neuComboBox3.alItems.AddRange(ListDrug);

            if (neuComboBox3.Items.Count > 0)
            {
                neuComboBox3.SelectedIndex = 0;
                tra_name = ((Neusoft.HISFC.Models.Pharmacy.Item)neuComboBox3.Items[0]).Name;
                tra_code = ((Neusoft.HISFC.Models.Pharmacy.Item)neuComboBox3.Items[0]).ID;
            }


            #endregion
        }
Пример #51
0
 public void editTableItem(int index, TableItem t)
 {
     table.Insert(index, t);
 }
Пример #52
0
 public void Insert(int index, T obj)
 {
     a.Insert(index, obj);
 }