public void TestIList() { int i = 0; // Leseoperationen Reise r = (Reise)dieReisen[i]; foreach (Reise r2 in dieReisen) { Console.WriteLine(r2.Zweck); } Reise[] arr = new Reise[] {}; dieReisen.CopyTo(arr, 0); IEnumerator ie = dieReisen.GetEnumerator(); // Schreiboperationen dieReisen.Add(r); dieReisen.Clear(); dieReisen.Insert(0, r); dieReisen.Remove(r); dieReisen.RemoveAt(0); // Kann mit der bloöen Oid implementiert werden. bool b = dieReisen.Contains(r); dieReisen.IndexOf(r); }
/* XXX old interface, will be removed at some point */ public static object ll_os_opendir(string path) { if (path == "") { Helpers.raise_OSError(Errno.ENOENT); } DirectoryInfo dir = new DirectoryInfo(path); if (!dir.Exists) { Helpers.raise_OSError(Errno.ENOENT); } System.Collections.Generic.List <string> names = new System.Collections.Generic.List <string>(); foreach (DirectoryInfo d in dir.GetDirectories()) { names.Add(d.Name); } foreach (FileInfo f in dir.GetFiles()) { names.Add(f.Name); } return(names.GetEnumerator()); }
/// <summary> /// IEnumerable.GetEnumerator - For Enumeration purposes /// </summary> /// <returns></returns> public IEnumerator GetEnumerator() { if (_innerBindingList != null) { return(_innerBindingList.GetEnumerator()); } System.Collections.Generic.List <InputBinding> list = new System.Collections.Generic.List <InputBinding>(0); return(list.GetEnumerator()); }
static StackObject *GetEnumerator_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Collections.Generic.List <global::TencentIMSDKMessage> instance_of_this_method = (System.Collections.Generic.List <global::TencentIMSDKMessage>) typeof(System.Collections.Generic.List <global::TencentIMSDKMessage>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.GetEnumerator(); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
/// <summary>Return a suitable String representation of the class instance. </summary> public override System.String ToString() { System.Text.StringBuilder rep = new System.Text.StringBuilder("[ComponentMappingBox ").Append(" "); rep.Append("nChannels= ").Append(System.Convert.ToString(nChannels)); System.Collections.IEnumerator Enum = map.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Enumeration.hasMoreElements' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilEnumerationhasMoreElements'" while (Enum.MoveNext()) { //UPGRADE_TODO: Method 'java.util.Enumeration.nextElement' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilEnumerationnextElement'" byte[] bfr = (byte[])Enum.Current; rep.Append(eol).Append(" ").Append("CMP= ").Append(System.Convert.ToString(getCMP(bfr))).Append(", "); rep.Append("MTYP= ").Append(System.Convert.ToString(getMTYP(bfr))).Append(", "); rep.Append("PCOL= ").Append(System.Convert.ToString(getPCOL(bfr))); } rep.Append("]"); return(rep.ToString()); }
static int _m_GetEnumerator(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Collections.Generic.List <int> __cl_gen_to_be_invoked = (System.Collections.Generic.List <int>)translator.FastGetCSObj(L, 1); try { { System.Collections.Generic.List <int> .Enumerator __cl_gen_ret = __cl_gen_to_be_invoked.GetEnumerator( ); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
public IEnumerator <MapNode> GetEnumerator() { return(selectedNodes.GetEnumerator()); }
protected void btnDel_Click(object sender, System.EventArgs e) { System.Collections.Generic.List <BudModifyTask> modifyTaskGV = this.GetModifyTaskGV(); System.Collections.Generic.List <string> list = new System.Collections.Generic.List <string>(); if (this.hfldEditModifyTaskId.Value.Contains('[')) { list = JsonHelper.GetListFromJson(this.hfldEditModifyTaskId.Value); } else { list.Add(this.hfldEditModifyTaskId.Value); } try { foreach (string current in list) { foreach (BudModifyTask budModifyTask in modifyTaskGV) { if (budModifyTask.ModifyTaskId == current) { modifyTaskGV.Remove(budModifyTask); base.Request.Cookies.Remove(current); System.Collections.Generic.List <BudModifyTaskRes> list2 = ( from r in this.modifyTaskResSer where r.ModifyTaskId == budModifyTask.ModifyTaskId select r).ToList <BudModifyTaskRes>(); using (System.Collections.Generic.List <BudModifyTaskRes> .Enumerator enumerator3 = list2.GetEnumerator()) { while (enumerator3.MoveNext()) { BudModifyTaskRes current2 = enumerator3.Current; this.modifyTaskResSer.Delete(current2); } break; } } } } this.BindGv(modifyTaskGV); this.hfldAllModifyTaskJson.Value = JsonNetWrap.SerializeObject(modifyTaskGV); System.Collections.Generic.List <BudModifyTask> modifyTaskGV2 = this.GetModifyTaskGV(); decimal d = 0m; d += modifyTaskGV2.Sum((BudModifyTask imt) => imt.Total); this.txtBudAmount.Value = d.ToString("0.000"); } catch { base.RegisterScript("top.ui.alert('删除失败!');"); } }
/// <summary> /// 返回循环访问的枚举器。 /// </summary> /// <returns>返回循环访问的枚举器。</returns> public IEnumerator <DefineEntry> GetEnumerator() { return(_list.GetEnumerator()); }
protected void btnSave_Click(object sender, System.EventArgs e) { if (BudgetManage_Cost_MoreBudget.organization) { OrganizationMonthBudget.DelAll(BudgetManage_Cost_MoreBudget.id); this.SaveDataToViewState(); System.Collections.Generic.List <OrganizationMonthBudget> list = this.ViewState["Budget"] as System.Collections.Generic.List <OrganizationMonthBudget>; using (System.Collections.Generic.List <OrganizationMonthBudget> .Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { OrganizationMonthBudget current = enumerator.Current; current.Add(current); } goto IL_B7; } } IndirectMonthBudget.DelAll(BudgetManage_Cost_MoreBudget.id); this.SaveDataToViewState(); System.Collections.Generic.List <IndirectMonthBudget> list2 = this.ViewState["Budget"] as System.Collections.Generic.List <IndirectMonthBudget>; foreach (IndirectMonthBudget current2 in list2) { current2.Add(current2); } IL_B7: base.RegisterScript("top.ui.winSuccess();;"); }
private void FillList() { this.dgvGpmember.DataSource = null; DataTable dataTable = new DataTable(); dataTable.Columns.Add("objID", typeof(string)); switch (this.cboType.SelectedIndex) { case 0: { dataTable.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMZone, new string[0]), typeof(string)); System.Collections.ArrayList allZone = ZoneInfo.getAllZone(); System.Collections.IEnumerator enumerator = allZone.GetEnumerator(); try { while (enumerator.MoveNext()) { ZoneInfo zoneInfo = (ZoneInfo)enumerator.Current; string text = zoneInfo.ZoneID.ToString(); string[] values = new string[] { text, zoneInfo.ZoneName }; dataTable.Rows.Add(values); } goto IL_46A; } finally { System.IDisposable disposable = enumerator as System.IDisposable; if (disposable != null) { disposable.Dispose(); } } break; } case 1: break; case 2: goto IL_285; case 3: goto IL_36E; default: goto IL_46A; } dataTable.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMRack, new string[0]), typeof(string)); dataTable.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMZone, new string[0]), typeof(string)); System.Collections.ArrayList allZone2 = ZoneInfo.getAllZone(); System.Collections.ArrayList allRack_NoEmpty = RackInfo.GetAllRack_NoEmpty(); System.Collections.IEnumerator enumerator2 = allRack_NoEmpty.GetEnumerator(); try { while (enumerator2.MoveNext()) { RackInfo rackInfo = (RackInfo)enumerator2.Current; string displayRackName = rackInfo.GetDisplayRackName(EcoGlobalVar.RackFullNameFlag); string text2 = rackInfo.RackID.ToString(); bool flag = false; string text3 = ""; foreach (ZoneInfo zoneInfo2 in allZone2) { text3 = zoneInfo2.ZoneName; string[] source = zoneInfo2.RackInfo.Split(new char[] { ',' }); if (source.Contains(text2)) { flag = true; break; } } string[] values; if (flag) { values = new string[] { text2, displayRackName, text3 }; } else { values = new string[] { text2, displayRackName, "" }; } dataTable.Rows.Add(values); } goto IL_46A; } finally { System.IDisposable disposable3 = enumerator2 as System.IDisposable; if (disposable3 != null) { disposable3.Dispose(); } } IL_285: dataTable.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMDev, new string[0]), typeof(string)); dataTable.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMRack, new string[0]), typeof(string)); System.Collections.Generic.List <DeviceInfo> allDevice = DeviceOperation.GetAllDevice(); using (System.Collections.Generic.List <DeviceInfo> .Enumerator enumerator4 = allDevice.GetEnumerator()) { while (enumerator4.MoveNext()) { DeviceInfo current = enumerator4.Current; string deviceName = current.DeviceName; string text4 = current.DeviceID.ToString(); RackInfo rackByID = RackInfo.getRackByID(current.RackID); string displayRackName2 = rackByID.GetDisplayRackName(EcoGlobalVar.RackFullNameFlag); string[] values = new string[] { text4, deviceName, displayRackName2 }; dataTable.Rows.Add(values); } goto IL_46A; } IL_36E: dataTable.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMOutlet, new string[0]), typeof(string)); dataTable.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMDev, new string[0]), typeof(string)); allDevice = DeviceOperation.GetAllDevice(); foreach (DeviceInfo current2 in allDevice) { System.Collections.Generic.List <PortInfo> portInfo = current2.GetPortInfo(); foreach (PortInfo current3 in portInfo) { string[] values = new string[] { current3.ID.ToString(), current3.PortName, current2.DeviceName }; dataTable.Rows.Add(values); } } IL_46A: this.dgvGpmember.DataSource = dataTable; this.dgvGpmember.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dgvGpmember.Columns[0].Visible = false; int selectedIndex = this.cboType.SelectedIndex; if (selectedIndex == 0) { this.dgvGpmember.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; return; } this.dgvGpmember.Columns[1].Width = 140; this.dgvGpmember.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; }
public virtual System.Collections.Generic.List <T> .Enumerator GetEnumerator() { return(list.GetEnumerator()); }
private static string ReadConfigToString() { string buffer = string.Empty; string zipBuffer = string.Empty; Catalog catalog = new Catalog(); catalog.Rows = 2; using (AvtoritetEntities ae = new AvtoritetEntities()) { System.Collections.Generic.List <Group> groups = (from r in ae.Group where r.Enable select r into t orderby t.Order select t).ToList <Group>(); catalog.Groups = new System.Collections.Generic.List <RelayServer.Models.Group>(); using (System.Collections.Generic.List <Group> .Enumerator enumerator = groups.GetEnumerator()) { while (enumerator.MoveNext()) { Group group = enumerator.Current; RelayServer.Models.Group catalogGroup = new RelayServer.Models.Group(); System.Collections.Generic.List <GroupBox> groupboxs = (from t in ae.GroupBox where t.GroupId == @group.GroupId && t.Enable select t into r orderby r.Title select r).ToList <GroupBox>(); catalogGroup.GroupBoxs = new System.Collections.Generic.List <RelayServer.Models.GroupBox>(); using (System.Collections.Generic.List <GroupBox> .Enumerator enumerator2 = groupboxs.GetEnumerator()) { while (enumerator2.MoveNext()) { GroupBox groupBox = enumerator2.Current; RelayServer.Models.GroupBox catalogGroupBox = new RelayServer.Models.GroupBox(); System.Collections.Generic.List <Brand> brands = (from t in ae.Brand where t.GroupBoxId == groupBox.GroupBoxId && t.Enable select t into r orderby r.NameAndFolder select r).ToList <Brand>(); catalogGroupBox.Brands = new System.Collections.Generic.List <RelayServer.Models.Brand>(); using (System.Collections.Generic.List <Brand> .Enumerator enumerator3 = brands.GetEnumerator()) { while (enumerator3.MoveNext()) { Brand brand = enumerator3.Current; RelayServer.Models.Brand catalogBrand = new RelayServer.Models.Brand(); System.Collections.Generic.List <Provider> providers = (from t in ae.Provider where t.BrandId == brand.BrandId && t.Enable select t into r orderby r.Order select r).ToList <Provider>(); catalogBrand.Providers = new System.Collections.Generic.List <RelayServer.Models.Provider>(); using (System.Collections.Generic.List <Provider> .Enumerator enumerator4 = providers.GetEnumerator()) { while (enumerator4.MoveNext()) { Provider provider = enumerator4.Current; ProviderAccount provAcc = ae.ProviderAccount.FirstOrDefault(t => t.ProviderId == provider.ProviderId && t.Enable); System.Collections.Generic.List <RelayServer.Models.CommandFile> commandFiles = (from t in ae.CommandFile where t.ProviderId == (int?)provider.ProviderId select t into r select new RelayServer.Models.CommandFile { FileName = r.FileName, FileContent = r.FileContent }).ToList <RelayServer.Models.CommandFile>(); System.Collections.Generic.List <RelayServer.Models.ProviderFile> providerFiles = (from t in ae.ProviderFile where t.ProviderId == (int?)provider.ProviderId select t into r select new RelayServer.Models.ProviderFile { FileName = r.FileName, FileExt = r.FileExt, FileSize = (long)r.FileSize, FileContent = r.FileContent }).ToList <RelayServer.Models.ProviderFile>(); catalogBrand.Providers.Add(new RelayServer.Models.Provider { Uri = provider.Uri.Trim(), IconPath = provider.IconPath, Title = provider.Title, Order = (provider.Order ?? 0), Commands = provider.commandcontent, Login = ((provAcc != null) ? provAcc.Login.Trim() : string.Empty), Password = ((provAcc != null) ? provAcc.Password.Trim() : string.Empty), CommandFiles = commandFiles, ProviderFiles = providerFiles }); } } catalogBrand.NameAndFolder = brand.NameAndFolder; catalogBrand.IconPath = brand.IconPath; catalogBrand.IconPath2 = brand.IconPath2; catalogBrand.IconPathImg = brand.IconPathImg; catalogBrand.IconPath2Img = brand.IconPath2Img; catalogBrand.Top = (brand.Top ?? 0); catalogBrand.Left = (brand.Left ?? 0); catalogBrand.Width = (brand.Width ?? 0); catalogBrand.Height = (brand.Height ?? 0); catalogBrand.BrandId = brand.BrandId; catalogBrand.ButtonStyle = brand.ButtonStyle; catalogBrand.MenuWindow = brand.MenuWindow.Value; catalogGroupBox.Brands.Add(catalogBrand); } } catalogGroupBox.Left = groupBox.Left.Value; catalogGroupBox.Top = groupBox.Top.Value; catalogGroupBox.Width = groupBox.Width.Value; catalogGroupBox.Height = groupBox.Height.Value; catalogGroupBox.Title = groupBox.Title; catalogGroupBox.VisibleBorder = groupBox.VisibleBorder.Value; catalogGroup.GroupBoxs.Add(catalogGroupBox); } } catalogGroup.Name = group.Name; catalogGroup.Width = group.Width.Value; catalogGroup.Height = group.Height.Value; catalogGroup.Order = (group.Order ?? 0); catalog.Groups.Add(catalogGroup); } } buffer = StringZip.Zip(new JavaScriptSerializer { MaxJsonLength = 2147483647 }.Serialize(catalog)); } return(buffer); }
public System.Collections.Generic.IEnumerator <ListViewGroupEx> GetEnumerator() => list.GetEnumerator();
//public List<Room> Rooms { get { return m_Rooms; } } public IEnumerator <Room> GetEnumerator() { return(m_Rooms.GetEnumerator()); }
protected void Page_Load(object sender, System.EventArgs e) { if (!base.IsPostBack) { this.hfldIsWBSRelevance.Value = this.isWBSRelevance; System.Collections.Generic.List <BudModifyTask> list = new System.Collections.Generic.List <BudModifyTask>(); System.Collections.Generic.List <BudModifyTask> list2 = new System.Collections.Generic.List <BudModifyTask>(); if (this.action == "Add") { this.hfldModifyId.Value = System.Guid.NewGuid().ToString(); } else { this.hfldModifyId.Value = this.id; list = ( from mt in this.modifyTaskSer where mt.ModifyId == this.hfldModifyId.Value && mt.ModifyType.Value == 0 select mt).ToList <BudModifyTask>(); list2 = ( from mt in this.modifyTaskSer where mt.ModifyId == this.hfldModifyId.Value && mt.ModifyType.Value == 1 select mt).ToList <BudModifyTask>(); this.BindModifyInfo(); decimal d = 0m; d += list.Sum((BudModifyTask omt) => omt.Total); d += list2.Sum((BudModifyTask imt) => imt.Total); this.txtBudAmount.Value = d.ToString("0.000"); } this.BindGv(list, list2); if (this.hfldIsWBSRelevance.Value == "1") { foreach (BudModifyTask current in list) { this.BindModifyTaskRes(current.ModifyTaskId); } using (System.Collections.Generic.List <BudModifyTask> .Enumerator enumerator2 = list2.GetEnumerator()) { while (enumerator2.MoveNext()) { BudModifyTask current2 = enumerator2.Current; this.BindModifyTaskRes(current2.ModifyTaskId); } goto IL_444; } } base.Request.Cookies.Remove(this.hfldModifyId.Value); System.Collections.Generic.List <BudModifyTaskRes> t = ( from mtss in this.modifyTaskResSer where mtss.ModifyId == this.hfldModifyId.Value select mtss).ToList <BudModifyTaskRes>(); string value = JsonHelper.JsonSerializer <System.Collections.Generic.List <BudModifyTaskRes> >(t); HttpCookie httpCookie = new HttpCookie(this.hfldModifyId.Value); httpCookie.Value = value; base.Response.Cookies.Add(httpCookie); IL_444: this.hfldPrjId.Value = this.prjId; this.uploadModify.RecordCode = this.hfldModifyId.Value; } }
private void BatchPaySend_Click(object sender, System.EventArgs e) { this.GetPaySetting(); if (string.IsNullOrEmpty(base.Request["CheckBoxGroup"])) { this.ShowMsg("参数错误!", false); return; } string text = base.Request["CheckBoxGroup"]; string value = this.PaybatchType.Value; if (value == "0") { string[] array = text.Split(new char[] { ',' }); System.Collections.Generic.List <OutPayWeiInfo> list = new System.Collections.Generic.List <OutPayWeiInfo>(); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string s = array2[i]; MemberAmountRequestInfo amountRequestDetail = MemberAmountProcessor.GetAmountRequestDetail(int.Parse(s)); if (amountRequestDetail != null && amountRequestDetail.State == RequesState.已审核 && this.DrawMinNum <= amountRequestDetail.Amount) { list.Add(new OutPayWeiInfo { Amount = (int)amountRequestDetail.Amount * 100, Partner_Trade_No = amountRequestDetail.RedpackId, Openid = amountRequestDetail.AccountCode, Re_User_Name = amountRequestDetail.AccountName, Desc = " 用户余额发放", UserId = amountRequestDetail.UserId, Nonce_Str = OutPayHelp.GetRandomString(20), Sid = amountRequestDetail.Id }); } } if (list.Count < 1) { this.ShowMsg("没有满足条件的提现请求!", false); this.LoadParameters(); this.BindData(); return; } System.Collections.Generic.List <WeiPayResult> list2 = OutPayHelp.BatchWeiPay(list); if (list2.Count < 1) { this.ShowMsg("系统异常,请联系管理员!", false); return; } if (list2[0].return_code == "INITFAIL") { this.ShowMsg(list2[0].return_msg, false); return; } int num = 0; int num2 = 0; int num3 = 0; int num4 = list.Count; string text2 = "<div class='errRow'>支付失败信息如下:"; using (System.Collections.Generic.List <WeiPayResult> .Enumerator enumerator = list2.GetEnumerator()) { while (enumerator.MoveNext()) { WeiPayResult rItem = enumerator.Current; int sid = list.FirstOrDefault((OutPayWeiInfo t) => t.Partner_Trade_No == rItem.partner_trade_no).Sid; if (rItem.result_code == "SUCCESS") { int[] serialids = new int[] { sid }; MemberAmountProcessor.SetAmountRequestStatus(serialids, 2, "微信企业付款:流水号" + rItem.payment_no, "", ManagerHelper.GetCurrentManager().UserName); int arg_298_0 = rItem.UserId; MemberAmountRequestInfo amountRequestDetail2 = MemberAmountProcessor.GetAmountRequestDetail(sid); if (amountRequestDetail2 != null) { string url = Globals.FullPath("/Vshop/MemberAmountRequestDetail.aspx?Id=" + amountRequestDetail2.Id); try { Messenger.SendWeiXinMsg_MemberAmountDrawCashRelease(amountRequestDetail2, url); } catch { } } num3 += rItem.Amount / 100; num++; } else { if (rItem.err_code == "OPENID_ERROR" || rItem.err_code == "NAME_MISMATCH" || rItem.return_msg.Contains("openid字段") || rItem.err_code == "FATAL_ERROR") { MemberAmountProcessor.SetAmountRequestStatus(new int[] { sid }, 3, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss ") + rItem.return_msg, "", ManagerHelper.GetCurrentManager().UserName); } else { MemberAmountProcessor.SetAmountRequestStatus(new int[] { sid }, 1, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss ") + rItem.return_msg, "", ManagerHelper.GetCurrentManager().UserName); } string text3 = text2; text2 = string.Concat(new string[] { text3, "<br>ID:", rItem.partner_trade_no, ", 出错提示:", rItem.return_msg }); num2++; } } } num4 = num4 - num2 - num; text2 += "</div>"; if (num3 == num && num3 != 0) { this.ShowMsg("全部支付成功", true); } else { this.ShowMsg(string.Concat(new object[] { "本次成功支付金额", num3, "元,其中成功", num, "笔,失败", num2, "笔,异常放弃", num4, "笔", text2 }), false); } this.LoadParameters(); this.BindData(); return; } else { if (value == "1") { this.ShowMsg("接口暂未开通", false); return; } this.ShowMsg("未定义支付方式", false); return; } }
public IEnumerator <WorkOrder> GetEnumerator() { return(_workOrderList.GetEnumerator()); }
/* XXX old interface, will be removed at some point */ public static object ll_os_opendir(string path) { if (path == "") Helpers.raise_OSError(Errno.ENOENT); DirectoryInfo dir = new DirectoryInfo(path); if (!dir.Exists) Helpers.raise_OSError(Errno.ENOENT); System.Collections.Generic.List<string> names = new System.Collections.Generic.List<string>(); foreach(DirectoryInfo d in dir.GetDirectories()) names.Add(d.Name); foreach(FileInfo f in dir.GetFiles()) names.Add(f.Name); return names.GetEnumerator(); }
private void init_Avail_data() { System.Collections.Generic.Dictionary <long, string> dictionary = new System.Collections.Generic.Dictionary <long, string>(); if (this.m_groupID >= 0L) { GroupInfo groupByID = GroupInfo.GetGroupByID(this.m_groupID); string memberList = groupByID.GetMemberList(); if (memberList != null && memberList.Length > 0) { string[] array = memberList.Split(new string[] { "," }, System.StringSplitOptions.RemoveEmptyEntries); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string value = array2[i]; long key = (long)System.Convert.ToInt32(value); dictionary.Add(key, ""); } } } this.dgvAvail.DataSource = null; this.Avail_tb = new DataTable(); this.Avail_tb.Columns.Add("objID", typeof(string)); this.Avail_tb.PrimaryKey = new DataColumn[] { this.Avail_tb.Columns[0] }; string groupType; if ((groupType = this.m_groupType) != null) { if (cct == null) { cct = new System.Collections.Generic.Dictionary <string, int>(7) { { "zone", 0 }, { "rack", 1 }, { "allrack", 2 }, { "dev", 3 }, { "alldev", 4 }, { "outlet", 5 }, { "alloutlet", 6 } }; } int num; if (cct.TryGetValue(groupType, out num)) { switch (num) { case 0: { this.Avail_tb.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMZone, new string[0]), typeof(string)); System.Collections.ArrayList allZone = ZoneInfo.getAllZone(); System.Collections.IEnumerator enumerator = allZone.GetEnumerator(); try { while (enumerator.MoveNext()) { ZoneInfo zoneInfo = (ZoneInfo)enumerator.Current; string text = zoneInfo.ZoneID.ToString(); if (!dictionary.ContainsKey(zoneInfo.ZoneID)) { string[] values = new string[] { text, zoneInfo.ZoneName }; this.Avail_tb.Rows.Add(values); } } return; } finally { System.IDisposable disposable = enumerator as System.IDisposable; if (disposable != null) { disposable.Dispose(); } } break; } case 1: case 2: break; case 3: case 4: goto IL_401; case 5: case 6: goto IL_50F; default: return; } this.Avail_tb.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMRack, new string[0]), typeof(string)); this.Avail_tb.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMZone, new string[0]), typeof(string)); System.Collections.ArrayList allZone2 = ZoneInfo.getAllZone(); System.Collections.ArrayList allRack_NoEmpty = RackInfo.GetAllRack_NoEmpty(); System.Collections.IEnumerator enumerator2 = allRack_NoEmpty.GetEnumerator(); try { while (enumerator2.MoveNext()) { RackInfo rackInfo = (RackInfo)enumerator2.Current; if (!dictionary.ContainsKey(rackInfo.RackID)) { string displayRackName = rackInfo.GetDisplayRackName(EcoGlobalVar.RackFullNameFlag); string text2 = rackInfo.RackID.ToString(); bool flag = false; string text3 = ""; foreach (ZoneInfo zoneInfo2 in allZone2) { text3 = zoneInfo2.ZoneName; string[] source = zoneInfo2.RackInfo.Split(new char[] { ',' }); if (source.Contains(text2)) { flag = true; break; } } string[] values; if (flag) { values = new string[] { text2, displayRackName, text3 }; } else { values = new string[] { text2, displayRackName, "" }; } this.Avail_tb.Rows.Add(values); } } return; } finally { System.IDisposable disposable3 = enumerator2 as System.IDisposable; if (disposable3 != null) { disposable3.Dispose(); } } IL_401: this.Avail_tb.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMDev, new string[0]), typeof(string)); this.Avail_tb.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMRack, new string[0]), typeof(string)); System.Collections.Generic.List <DeviceInfo> allDevice = DeviceOperation.GetAllDevice(); using (System.Collections.Generic.List <DeviceInfo> .Enumerator enumerator4 = allDevice.GetEnumerator()) { while (enumerator4.MoveNext()) { DeviceInfo current = enumerator4.Current; if (!dictionary.ContainsKey((long)current.DeviceID)) { string deviceName = current.DeviceName; string text4 = current.DeviceID.ToString(); RackInfo rackByID = RackInfo.getRackByID(current.RackID); string displayRackName2 = rackByID.GetDisplayRackName(EcoGlobalVar.RackFullNameFlag); string[] values = new string[] { text4, deviceName, displayRackName2 }; this.Avail_tb.Rows.Add(values); } } return; } IL_50F: this.Avail_tb.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMOutlet, new string[0]), typeof(string)); this.Avail_tb.Columns.Add(EcoLanguage.getMsg(LangRes.Group_NMDev, new string[0]), typeof(string)); allDevice = DeviceOperation.GetAllDevice(); foreach (DeviceInfo current2 in allDevice) { System.Collections.Generic.List <PortInfo> portInfo = current2.GetPortInfo(); foreach (PortInfo current3 in portInfo) { if (!dictionary.ContainsKey((long)current3.ID)) { string[] values = new string[] { current3.ID.ToString(), current3.PortName, current2.DeviceName }; this.Avail_tb.Rows.Add(values); } } } } } }
public static void InitialDetectPort() { try { MySerialPortProcess.PreviDevicePortList.Clear(); MySerialPortProcess.DevicePortList.Clear(); System.Collections.Generic.List <object> portFriendlyName = MySerialPortProcess.GetPortFriendlyName(); using (System.Collections.Generic.List <object> .Enumerator enumerator = portFriendlyName.GetEnumerator()) { while (enumerator.MoveNext()) { string text = (string)enumerator.Current; try { string text2 = text; text2 = text2.Substring(text2.IndexOf("(") + 1); text2 = text2.Substring(0, text2.IndexOf(")")); MySerialPortProcess.SerialPortList.Add(text2, new SerialPort(text2, 4800)); MySerialPortProcess.SerialPortList[text2].Open(); MySerialPortProcess.SerialPortList[text2].DataReceived -= new SerialDataReceivedEventHandler(MySerialPortProcess.SerialPort_DataReceived); MySerialPortProcess.SerialPortList[text2].DataReceived += new SerialDataReceivedEventHandler(MySerialPortProcess.SerialPort_DataReceived); } catch (System.Exception e) { ErrorXMLProcess.ExceptionProcess(e); } } } } catch (System.Exception e) { ErrorXMLProcess.ExceptionProcess(e); } }
public IEnumerator GetEnumerator() { return(list.GetEnumerator()); }
private void BatchPaySend_Click(object sender, System.EventArgs e) { this.GetPaySetting(); if (string.IsNullOrEmpty(base.Request["CheckBoxGroup"])) { this.ShowMsg("参数错误!", false); return; } string text = base.Request["CheckBoxGroup"]; string value = this.PaybatchType.Value; if (value == "0") { string[] array = text.Split(new char[] { ',' }); System.Collections.Generic.List <OutPayWeiInfo> list = new System.Collections.Generic.List <OutPayWeiInfo>(); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text2 = array2[i]; BalanceDrawRequestInfo balanceDrawRequestById = DistributorsBrower.GetBalanceDrawRequestById(text2.ToString()); if (balanceDrawRequestById != null && balanceDrawRequestById.IsCheck == "1" && this.DrawMinNum <= balanceDrawRequestById.Amount && !string.IsNullOrEmpty(balanceDrawRequestById.RedpackId)) { list.Add(new OutPayWeiInfo { Amount = (int)balanceDrawRequestById.Amount * 100, Partner_Trade_No = balanceDrawRequestById.RedpackId, Sid = balanceDrawRequestById.SerialId, Openid = balanceDrawRequestById.MerchantCode, Re_User_Name = balanceDrawRequestById.AccountName, Desc = " 分销商佣金发放", UserId = balanceDrawRequestById.UserId, Nonce_Str = OutPayHelp.GetRandomString(20) }); } } if (list.Count < 1) { this.ShowMsg("没有满足条件的提现请求!", false); this.LoadParameters(); this.BindData(); return; } System.Collections.Generic.List <WeiPayResult> list2 = OutPayHelp.BatchWeiPay(list); if (list2.Count < 1) { this.ShowMsg("系统异常,请联系管理员!", false); return; } if (list2[0].return_code == "INITFAIL") { this.ShowMsg(list2[0].return_msg, false); return; } int num = 0; int num2 = 0; int num3 = 0; int num4 = list.Count; string text3 = "<div class='errRow'>支付失败信息如下:"; using (System.Collections.Generic.List <WeiPayResult> .Enumerator enumerator = list2.GetEnumerator()) { while (enumerator.MoveNext()) { WeiPayResult rItem = enumerator.Current; int sid = list.FirstOrDefault((OutPayWeiInfo t) => t.Partner_Trade_No == rItem.partner_trade_no).Sid; if (rItem.result_code == "SUCCESS") { VShopHelper.UpdateBalanceDrawRequest(sid, "微信企业付款:流水号" + rItem.payment_no); int arg_290_0 = rItem.UserId; decimal num5 = rItem.Amount / 100; VShopHelper.UpdateBalanceDistributors(rItem.UserId, num5); if (num5 > 0m && sid > 0) { BalanceDrawRequestInfo balanceDrawRequestById2 = DistributorsBrower.GetBalanceDrawRequestById(sid.ToString()); if (balanceDrawRequestById2 != null) { try { Messenger.SendWeiXinMsg_DrawCashRelease(balanceDrawRequestById2); } catch { } } } num3 += rItem.Amount / 100; num++; } else { if (rItem.err_code == "OPENID_ERROR" || rItem.err_code == "NAME_MISMATCH" || rItem.return_msg.Contains("openid字段") || rItem.err_code == "FATAL_ERROR") { DistributorsBrower.SetBalanceDrawRequestIsCheckStatus(new int[] { sid }, 3, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss ") + rItem.return_msg, null); } else { DistributorsBrower.SetBalanceDrawRequestIsCheckStatus(new int[] { sid }, 1, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss ") + rItem.return_msg, null); } object obj = text3; text3 = string.Concat(new object[] { obj, "<br>ID:", sid, ", 出错提示:", rItem.return_msg }); num2++; } } } num4 = num4 - num2 - num; text3 += "</div>"; if (num3 == num && num3 != 0) { this.ShowMsg("全部支付成功", true); } else { this.ShowMsg(string.Concat(new object[] { "本次成功支付金额", num3, "元,其中成功", num, "笔,失败", num2, "笔,异常放弃", num4, "笔", text3 }), false); } this.LoadParameters(); this.BindData(); return; } else { if (value == "1") { this.ShowMsg("接口暂未开通", false); return; } this.ShowMsg("未定义支付方式", false); return; } }
/// <summary> /// IEnumerable.GetEnumerator - For Enumeration purposes /// </summary> /// <returns></returns> public IEnumerator GetEnumerator() { if (_innerBindingList != null) return _innerBindingList.GetEnumerator(); System.Collections.Generic.List<InputBinding> list = new System.Collections.Generic.List<InputBinding>(0); return list.GetEnumerator(); }
public IEnumerator <V3Data> GetEnumerator() { return(collect.GetEnumerator()); }
public System.Collections.Generic.IEnumerator <ListViewGroupEx> GetEnumerator() { return(list.GetEnumerator()); }
public IEnumerator <T> GetEnumerator() { return(_list.GetEnumerator()); }
/// <summary> /// 返回循环访问的枚举器。 /// </summary> /// <returns></returns> public IEnumerator <IParameterInfo> GetEnumerator() { return(_list.GetEnumerator()); }
/// <summary> /// Returns an enumerator that iterates through the collection. /// </summary> /// <returns> /// A <see cref="T:System.Collections.Generic.IEnumerator`1" /> that can be used to iterate through the collection. /// </returns> public IEnumerator <TWord> GetEnumerator() { return(m_oWords.GetEnumerator()); }
private void BindChildNode(TreeNode parentNode) { System.Collections.Generic.List <EquEquipmentType> list = ( from t in this.equTypeSer where t.ParentId == parentNode.Value orderby t.Code select t).ToList <EquEquipmentType>(); if (list.Count <EquEquipmentType>() > 0) { using (System.Collections.Generic.List <EquEquipmentType> .Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { EquEquipmentType current = enumerator.Current; TreeNode treeNode = new TreeNode(); treeNode.Text = current.Name; treeNode.Value = current.Id; if (base.Request["id"] == treeNode.Value) { treeNode.Select(); } parentNode.ChildNodes.Add(treeNode); this.BindChildNode(treeNode); } return; } } if (!string.IsNullOrEmpty(this.noChildIdList)) { this.noChildIdList += ","; } this.noChildIdList += parentNode.Value; }
public IEnumerator <T> GetEnumerator() { return(enumerableItemList.GetEnumerator()); }
/// <summary> /// 返回循环访问[元素]集合的枚举数。 /// </summary> /// <returns></returns> public IEnumerator <T> GetEnumerator() { return(Items.GetEnumerator()); }