public bool IsRunOper() { string uname = tbName.Text.Trim(); if (uname == "") { WinOften.MessShow("用户名不能为空!", 1); return(false); } if (!Often.StrIsReg(uname, Often.RegExpStr_Num26LeAndCna)) { WinOften.MessShow("用户名必须由数字、下划线、26个英文大小写字母或者中文组成!", 1); return(false); } if (OpMode == 0 || (OpMode == 1 && tbPwd.Text.Trim() != "")) { if (tbPwd.Text.Trim() == "") { WinOften.MessShow("密码不能为空!", 1); return(false); } if (OpMode == 0) { if (tbPwd.Text.Trim() != tbfPwd.Text.Trim()) { WinOften.MessShow("密码与确认密码不符!", 1); return(false); } } } return(true); }
private void btdel_Click(object sender, EventArgs e) { if (userlist.SelectedItems.Count > 0) { DialogResult result = MessageBox.Show("确认删除用户?", "系统提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation); if (result == DialogResult.Cancel) { return; } string uname = userlist.SelectedItems[0].SubItems[0].Text.Trim(); if (uname != "") { DataRow[] udrs = wapp.UserList.UsersTable.Select("UserName='******'"); if (udrs.Length > 0) { if (udrs[0]["UserName"].ToString().Trim() == wapp.SysConfig.atUser.UserName.Trim()) { WinOften.MessShow("不能删除当前用户!", 1); return; } udrs[0].Delete(); wapp.UserList.SaveUsersTable(null); LoadUserList(); } } } }
public bool IsRunOper() { string ltitle = tbListTitle.Text.Trim(); if (ltitle == "") { WinOften.MessShow("标题不能为空!", 1); return(false); } string lcode = tbListCode.Text.Trim(); if (lcode == "") { WinOften.MessShow("代码不能为空!", 1); return(false); } string onum = tbOrderNum.Text.Trim(); if (!Often.IsInt32(onum)) { WinOften.MessShow("排序必须是数字!", 1); return(false); } string crule = rTBContentRule.Text.Trim(); if (crule == "") { WinOften.MessShow("内容匹配规则不能为空!", 1); return(false); } return(true); }
private void LoadInfo() { DataRow[] idrs = wapp.WebSpiderInfoList.WebSpiderInfoTable.Select("ListID='" + ids + "'"); if (idrs.Length > 0) { infodt = DataOften.GetTable(idrs); } else { WinOften.MessShow("该信息不存在或已被删除!", 1); this.Close(); return; } tbListTitle.Text = DataOften.GetStr(infodt, "ListTitle"); tbListCode.Text = DataOften.GetStr(infodt, "ListCode"); tbOrderNum.Text = DataOften.GetStr(infodt, "OrderNum"); rTBContentRule.Text = DataOften.GetStr(infodt, "ContentRule"); rTBContentRangeRule.Text = DataOften.GetStr(infodt, "ContentRangeRule"); tbContentRuleIndex.Text = DataOften.GetStr(infodt, "ContentRuleIndex"); tbContentRangeRuleIndex.Text = DataOften.GetStr(infodt, "ContentRangeRuleIndex"); rTBContentRegFilt.Text = DataOften.GetStr(infodt, "ContentRegFilt"); wapp.AppPub.SetRadioListChecked(DataOften.GetStr(infodt, "ContentType"), rbctype); wapp.AppPub.SelectComboBoxItems(cBContentCodeMode, DataOften.GetStr(infodt, "ContentCodeMode")); string cf = DataOften.GetStr(infodt, "ContentFilt"); cflist = wapp.AppPub.GetIntList(cf, 4); wapp.AppPub.SetRadioListChecked(cflist[0].ToString(), rbcfilta); wapp.AppPub.SetRadioListChecked(cflist[1].ToString(), rbcfiltb); wapp.AppPub.SetRadioListChecked(cflist[2].ToString(), rbcfiltc); wapp.AppPub.SetRadioListChecked(cflist[3].ToString(), rbcfiltd); }
private void FrmUserInfo_Shown(object sender, EventArgs e) { if (wapp.SysConfig.atUser.ManageLv < 60) { WinOften.MessShow("操作权限不足!", 1); this.Close(); } }
public bool IsAdmin() { if (wapp.SysConfig.atUser.ManageLv < 100) { WinOften.MessShow("操作权限不足!", 1); return(false); } return(true); }
private void btsave_Click(object sender, EventArgs e) { if (!IsRunOper()) { return; } string sname = tbSpiderName.Text.Trim(); if (OpMode == 0) { DataRow[] drs = wapp.WebSpiderList.WebSpiderTable.Select("SpiderName='" + sname + "'"); if (drs.Length > 0) { WinOften.MessShow("名称已存在!", 1); return; } } string guid = System.Guid.NewGuid().ToString("N").ToUpper(); if (ids != "") { guid = ids; } wapp.WebSpider ws = new wapp.WebSpider(); ws.SpiderID = guid; ws.SpiderName = tbSpiderName.Text.Trim(); ws.OrderNum = Convert.ToInt32(tbOrderNum.Text); ws.UrlList = rTBUrlList.Text.Trim(); ws.UrlRule = rTBUrlRule.Text.Trim(); ws.UrlRangeRule = rTBUrlRangeRule.Text.Trim(); ws.UrlRuleIndex = wapp.AppPub.GetInt(tbUrlRuleIndex.Text); ws.UrlRangeRuleIndex = wapp.AppPub.GetInt(tbUrlRangeRuleIndex.Text); ws.ExcelSavePath = tbExcelSavePath.Text.Trim(); ws.HtmlSavePath = tbHtmlSavePath.Text.Trim(); ws.IsSaveHtml = wapp.AppPub.GetRadioListCheckedIndex(rbishtml); ws.CodingMode = wapp.AppPub.GetRadioListCheckedIndex(rbcmode); ws.IsEcho = wapp.AppPub.GetRadioListCheckedIndex(rbisecho); ws.IsNext = wapp.AppPub.GetRadioListCheckedIndex(rbisnext); ws.ConIsNext = wapp.AppPub.GetRadioListCheckedIndex(rbcisnext); ws.NextMode = wapp.AppPub.GetRadioListCheckedIndex(rbnmode); ws.ConNextMode = wapp.AppPub.GetRadioListCheckedIndex(rbcnmode); ws.GatherMaxNum = Convert.ToInt32(tbGatherMaxNum.Text); ws.PageCoding = cBPageCoding.Text; ws.NextRangeRule = rTBNextRangeRule.Text; ws.NextRule = rTBNextRule.Text; ws.ConNextRangeRule = rTBConNextRangeRule.Text; ws.ConNextRule = rTBConNextRule.Text; ws.NextRangeRuleIndex = wapp.AppPub.GetInt(tbNextRangeRuleIndex.Text); ws.NextRuleIndex = wapp.AppPub.GetInt(tbNextRuleIndex.Text); ws.ConNextRangeRuleIndex = wapp.AppPub.GetInt(tbConNextRangeRuleIndex.Text); ws.ConNextRuleIndex = wapp.AppPub.GetInt(tbConNextRuleIndex.Text); wapp.WebSpiderList.SaveWebSpiderTable(ws); WinOften.MessShow("保存成功!", 0); IsOper = true; this.Close(); }
private void LoadPInfo() { DataRow[] idrs = wapp.WebSpiderList.WebSpiderTable.Select("SpiderID='" + pids + "'"); if (idrs.Length <= 0) { WinOften.MessShow("该信息不存在或已被删除!", 1); this.Close(); return; } }
private void UserLogin() { wapp.SysConfig.atUser = new wapp.SysUser(); string Name = cBName.Text.Trim(); if (Name == "") { WinOften.MessShow("用户名不能为空!", 1); return; } string Pwd = tPwd.Text.Trim(); if (Pwd == "") { WinOften.MessShow("密码不能为空!", 1); return; } if (wapp.UserList.UsersTable.Rows.Count <= 0) { wapp.SysUser su = new wapp.SysUser(); su.UserName = "******"; su.UserPwd = "123456"; su.RealName = "admin"; su.Phones = ""; su.ManageLv = 60; su.LoginCount = 1; su.LoginDate = DateTime.Now; wapp.UserList.SaveUsersTable(su); } string ePwd = TripleDes.DesEn(Pwd, wapp.AppList.DeKey).Trim(); DataRow[] udrs = wapp.UserList.UsersTable.Select("UserName='******' and UserPwd='" + ePwd + "'"); if (udrs.Length > 0) { wapp.SysConfig.atUser.UserName = udrs[0]["UserName"].ToString().Trim(); wapp.SysConfig.atUser.UserPwd = Pwd; wapp.SysConfig.atUser.ManageLv = Convert.ToInt32(udrs[0]["ManageLv"]); wapp.SysConfig.atUser.RealName = udrs[0]["RealName"].ToString().Trim(); wapp.SysConfig.atUser.Phones = udrs[0]["Phones"].ToString().Trim(); wapp.SysConfig.atUser.LoginCount = Convert.ToInt32(udrs[0]["LoginCount"]) + 1; wapp.SysConfig.atUser.LoginDate = DateTime.Now; wapp.UserList.SaveUsersTable(wapp.SysConfig.atUser); SaveUserConfig(); } if (wapp.SysConfig.atUser.ManageLv == 0) { WinOften.MessShow("用户名或密码错误!", 1); return; } else { this.Hide(); ShowFrm(); } }
private void FormLogin_Load(object sender, EventArgs e) { WinOften.AnimateWindow(this.Handle, 500, 16); //设置主窗口关闭按钮不可用 int hMenu = WinOften.GetSystemMenu(this.Handle.ToInt32(), 0); WinOften.RemoveMenu(hMenu, 0xF060, 0x1000); ucfg = wapp.SysConfig.GetUserConfig(); LoadUserConfig(); LoadLists(); }
/// <summary>是否允许退出</summary> /// <returns>是否允许退出</returns> private bool IsExit() { if (WinOften.IsFormAction()) { if (MessageBox.Show("当前有操作正在执行中,确认退出?", "系统警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.Cancel) { return(false); } } return(true); }
private void bt05b_Click(object sender, EventArgs e) { string s = GetInput(); if (!Often.IsInt64(s)) { WinOften.MessShow("输入的字符串必须是整数", 1); return; } GetOut(Often.DecToIp(Convert.ToInt64(GetInput())).ToString()); }
private void bt05a_Click(object sender, EventArgs e) { try { GetOut(Often.IpToDec(GetInput()).ToString()); } catch (Exception ex) { WinOften.MessShow("发生错误,错误信息:" + ex.Message, 1); return; } }
public bool IsRunOper() { DateTime dqrq = DateTime.Now; string acturl = rTBActionUrl.Text.Trim(); if (acturl == "") { WinOften.MessShow("访问地址不能为空!", 1); return(false); } return(true); }
public void BuildGuid() { if (!Often.IsInt32(tBnum.Text)) { WinOften.MessShow("生成数量必须是整数!", 1); return; } int bCount = Convert.ToInt32(tBnum.Text); if (bCount <= 0) { WinOften.MessShow("生成数量必须大于0!", 1); return; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < bCount; i++) { if (rBtypea.Checked) { sb.Append(System.Guid.NewGuid().ToString()); } else if (rBtypeb.Checked) { sb.Append(System.Guid.NewGuid().ToString("N")); } else if (rBtypec.Checked) { sb.Append(System.Guid.NewGuid().ToString("D")); } else if (rBtyped.Checked) { sb.Append(System.Guid.NewGuid().ToString("B")); } else if (rBtypee.Checked) { sb.Append(System.Guid.NewGuid().ToString("P")); } sb.Append("\r\n"); } if (rBcaseb.Checked) { sb = new StringBuilder(sb.ToString().ToUpper()); } else if (rBcasec.Checked) { sb = new StringBuilder(sb.ToString().ToLower()); } rB.Text = sb.ToString(); }
/// <summary>关闭子窗口,如果不传递需要关闭的窗口名称则关闭所有窗口,关闭成功返回true,否则返回false</summary> /// <param name="f">父窗口</param> /// <param name="formName">需要关闭的窗口名称集合</param> public static bool CloseForms(Form f, params string[] formNames) { List <string> li = new List <string>(formNames); bool isall = false; Form[] AddFrm = f.MdiChildren; for (int i = 0; i < AddFrm.Length; i++) { if (AddFrm[i] != null) { bool isclose = false; string formName = AddFrm[i].Name.Trim(); if (li.Count > 0) { if (li.IndexOf(formName) > -1) { isclose = true; } } else { isclose = true; } if (isclose) { isclose = false; if (!WinOften.IsFormAction(formName)) { isclose = true; } else { if (MessageBox.Show("[" + AddFrm[i].Text + "]操作正在执行中,确认退出?", "系统警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK) { isclose = true; } } if (isclose) { AddFrm[i].Close(); AddFrm[i].Dispose(); } } } } return(isall); }
private void btsave_Click(object sender, EventArgs e) { if (!IsRunOper()) { return; } string ltitle = tbListTitle.Text.Trim(); if (OpMode == 0) { DataRow[] drs = wapp.WebSpiderInfoList.WebSpiderInfoTable.Select("ListTitle='" + ltitle + "'"); if (drs.Length > 0) { WinOften.MessShow("标题已存在!", 1); return; } } string guid = System.Guid.NewGuid().ToString("N").ToUpper(); if (ids != "") { guid = ids; } wapp.WebSpiderInfo wsi = new wapp.WebSpiderInfo(); wsi.ListID = guid; wsi.SpiderID = pids; wsi.ListTitle = tbListTitle.Text.Trim(); wsi.ListCode = tbListCode.Text.Trim(); wsi.OrderNum = Convert.ToInt32(tbOrderNum.Text); wsi.ContentRule = rTBContentRule.Text.Trim(); wsi.ContentRangeRule = rTBContentRangeRule.Text.Trim(); wsi.ContentRuleIndex = wapp.AppPub.GetInt(tbContentRuleIndex.Text); wsi.ContentRangeRuleIndex = wapp.AppPub.GetInt(tbContentRangeRuleIndex.Text); wsi.ContentRegFilt = rTBContentRegFilt.Text.Trim(); wsi.ContentType = wapp.AppPub.GetRadioListCheckedIndex(rbctype); wsi.ContentCodeMode = wapp.AppPub.GetInt(((ValTxt)cBContentCodeMode.SelectedItem).Value); string cfs = wapp.AppPub.GetRadioListCheckedIndex(rbcfilta).ToString() + "," + wapp.AppPub.GetRadioListCheckedIndex(rbcfiltb).ToString() + "," + wapp.AppPub.GetRadioListCheckedIndex(rbcfiltc).ToString() + "," + wapp.AppPub.GetRadioListCheckedIndex(rbcfiltd).ToString(); wsi.ContentFilt = cfs; wapp.WebSpiderInfoList.SaveWebSpiderInfoTable(wsi); WinOften.MessShow("保存成功!", 0); IsOper = true; this.Close(); }
private void LoadUserInfo() { DataRow[] udrs = wapp.UserList.UsersTable.Select("UserName='******'"); if (udrs.Length > 0) { userdt = DataOften.GetTable(udrs); } else { WinOften.MessShow("该用户不存在或已被删除!", 1); this.Close(); return; } tbfPwd.Enabled = false; tbName.Text = DataOften.GetStr(userdt, "UserName"); tbrealName.Text = DataOften.GetStr(userdt, "RealName"); tbphone.Text = DataOften.GetStr(userdt, "Phones"); tbPwd.Text = " "; tbName.Enabled = false; }
private void LoadInfo() { DataRow[] idrs = wapp.WebSpiderList.WebSpiderTable.Select("SpiderID='" + ids + "'"); if (idrs.Length > 0) { infodt = DataOften.GetTable(idrs); } else { WinOften.MessShow("该信息不存在或已被删除!", 1); this.Close(); return; } btset.Visible = true; tbSpiderName.Text = DataOften.GetStr(infodt, "SpiderName"); tbOrderNum.Text = DataOften.GetStr(infodt, "OrderNum"); rTBUrlList.Text = DataOften.GetStr(infodt, "UrlList"); rTBUrlRule.Text = DataOften.GetStr(infodt, "UrlRule"); rTBUrlRangeRule.Text = DataOften.GetStr(infodt, "UrlRangeRule"); tbUrlRuleIndex.Text = DataOften.GetStr(infodt, "UrlRuleIndex"); tbUrlRangeRuleIndex.Text = DataOften.GetStr(infodt, "UrlRangeRuleIndex"); tbExcelSavePath.Text = DataOften.GetStr(infodt, "ExcelSavePath"); tbHtmlSavePath.Text = DataOften.GetStr(infodt, "HtmlSavePath"); tbGatherMaxNum.Text = DataOften.GetStr(infodt, "GatherMaxNum"); cBPageCoding.Text = DataOften.GetStr(infodt, "PageCoding"); rTBNextRangeRule.Text = DataOften.GetStr(infodt, "NextRangeRule"); rTBNextRule.Text = DataOften.GetStr(infodt, "NextRule"); rTBConNextRangeRule.Text = DataOften.GetStr(infodt, "ConNextRangeRule"); rTBConNextRule.Text = DataOften.GetStr(infodt, "ConNextRule"); tbNextRangeRuleIndex.Text = DataOften.GetStr(infodt, "NextRangeRuleIndex"); tbNextRuleIndex.Text = DataOften.GetStr(infodt, "NextRuleIndex"); tbConNextRangeRuleIndex.Text = DataOften.GetStr(infodt, "ConNextRangeRuleIndex"); tbConNextRuleIndex.Text = DataOften.GetStr(infodt, "ConNextRuleIndex"); wapp.AppPub.SetRadioListChecked(DataOften.GetStr(infodt, "IsSaveHtml"), rbishtml); wapp.AppPub.SetRadioListChecked(DataOften.GetStr(infodt, "CodingMode"), rbcmode); wapp.AppPub.SetRadioListChecked(DataOften.GetStr(infodt, "IsEcho"), rbisecho); wapp.AppPub.SetRadioListChecked(DataOften.GetStr(infodt, "IsNext"), rbisnext); wapp.AppPub.SetRadioListChecked(DataOften.GetStr(infodt, "ConIsNext"), rbcisnext); wapp.AppPub.SetRadioListChecked(DataOften.GetStr(infodt, "NextMode"), rbnmode); wapp.AppPub.SetRadioListChecked(DataOften.GetStr(infodt, "ConNextMode"), rbcnmode); }
private void btsave_Click(object sender, EventArgs e) { if (!IsRunOper()) { return; } string name = tbName.Text.Trim(); if (OpMode == 0) { DataRow[] udrs = wapp.UserList.UsersTable.Select("UserName='******'"); if (udrs.Length > 0) { WinOften.MessShow("用户名已存在!", 1); return; } } int mv = 60; wapp.SysUser su = new wapp.SysUser(); su.UserName = name; su.UserPwd = tbPwd.Text.Trim(); su.ManageLv = mv; su.RealName = tbrealName.Text.Trim(); su.Phones = tbphone.Text.Trim(); if (OpMode == 1) { su.LoginDate = Convert.ToDateTime(DataOften.GetStr(userdt, "LoginDate")); } else { su.LoginDate = Convert.ToDateTime("1990-01-01"); } wapp.UserList.SaveUsersTable(su); WinOften.MessShow("保存成功!", 0); IsOper = true; this.Close(); }
private void btbuild_Click(object sender, EventArgs e) { StringBuilder sb = new StringBuilder(); string urlq = tburlq.Text.Trim(); string urlh = tburlh.Text.Trim(); string snums = tbnums.Text.Trim(); string snume = tbnume.Text.Trim(); if (!Often.IsInt64(snums)) { WinOften.MessShow("循环起始数字必须是整数!", 1); return; } if (!Often.IsInt64(snume)) { WinOften.MessShow("循环终止数字必须是整数!", 1); return; } long nums = Convert.ToInt64(snums); long nume = Convert.ToInt64(snume); if (nume < nums) { WinOften.MessShow("循环终止数字不能小于循环起始数字!", 1); return; } for (long i = nums; i <= nume; i++) { if (sb.Length > 0) { sb.Append("\r\n"); } sb.Append(urlq + i.ToString() + urlh); } IsOper = true; rTBUrlList.Text = sb.ToString(); RegRuleText = rTBUrlList.Text.Trim(); }
public void Build() { BandSearch(); string s = tBbanks.Text.Trim(); if (s != "" && slist.Count <= 0) { WinOften.MessShow("未筛选到银行信息!", 1); return; } if (!Often.IsInt32(tBnum.Text)) { WinOften.MessShow("生成数量必须是整数!", 1); return; } int FareCount = Convert.ToInt32(tBnum.Text); if (FareCount <= 0) { WinOften.MessShow("生成数量必须大于0!", 1); return; } int ws = Convert.ToInt32(cBnum.SelectedItem); StringBuilder adsb = new StringBuilder(); string bankcard = ""; string fareType = ""; string fname = ""; string idcardType = ""; string idcard = ""; string birthday = ""; string gender = ""; int age = 0; string phone = ""; string spellName = ""; for (int i = 0; i < FareCount; i++) { if (slist.Count > 0) { int index = slist[AppPub.pub.ran.Next(0, slist.Count)] - 1; string fnum = AppPub.BankCard.BankBin[index].ToString(); bankcard = AppPub.BankCard.CreditRandomBankCard(fnum, ws); } else { bankcard = AppPub.BankCard.CreditRandomBankCard(ws); } fareType = "AD"; AppPub.RandomName.RandomBuildFareInfo(fareType, ref fname, ref idcardType, ref idcard, ref birthday, ref gender, ref age, ref phone, ref spellName); adsb.Append(" "); adsb.Append(fname); adsb.Append(" "); adsb.Append(bankcard); adsb.Append(" "); adsb.Append(birthday); adsb.Append(" "); adsb.Append(age.ToString()); adsb.Append(" "); adsb.Append(gender); adsb.Append(" "); adsb.Append(phone); adsb.Append(" "); adsb.Append(spellName); adsb.Append("\r\n"); } rB.Text = adsb.ToString(); }
public void BuildFare() { string ADMan = "0"; if (cBad.Checked) { ADMan = "1"; } string CHMan = "0"; if (cBch.Checked) { CHMan = "1"; } string INMan = "0"; if (cBin.Checked) { INMan = "1"; } if (!cBad.Checked && !cBch.Checked && !cBin.Checked) { WinOften.MessShow("至少选择一个旅客类型!", 1); return; } if (!Often.IsInt32(tBnum.Text)) { WinOften.MessShow("生成数量必须是整数!", 1); return; } int FareCount = Convert.ToInt32(tBnum.Text); if (FareCount <= 0) { WinOften.MessShow("生成数量必须大于0!", 1); return; } StringBuilder adsb = new StringBuilder(); StringBuilder chsb = new StringBuilder(); StringBuilder insb = new StringBuilder(); string fareType = ""; string fname = ""; string idcardType = ""; string idcard = ""; string birthday = ""; string gender = ""; int age = 0; string phone = ""; string spellName = ""; if (ADMan == "1") { for (int i = 0; i < FareCount; i++) { fareType = "AD"; AppPub.RandomName.RandomBuildFareInfo(fareType, ref fname, ref idcardType, ref idcard, ref birthday, ref gender, ref age, ref phone, ref spellName); adsb.Append(" "); adsb.Append(fname); adsb.Append(" "); adsb.Append(idcard); adsb.Append(" "); adsb.Append(birthday); adsb.Append(" "); adsb.Append(age.ToString()); adsb.Append(" "); adsb.Append(gender); adsb.Append(" "); adsb.Append(phone); adsb.Append(" "); adsb.Append(spellName); adsb.Append("\r\n"); } } if (CHMan == "1") { for (int i = 0; i < FareCount; i++) { fareType = "CH"; AppPub.RandomName.RandomBuildFareInfo(fareType, ref fname, ref idcardType, ref idcard, ref birthday, ref gender, ref age, ref phone, ref spellName); chsb.Append(" "); chsb.Append(fname); chsb.Append(" "); chsb.Append(idcard); chsb.Append(" "); chsb.Append(birthday); chsb.Append(" "); chsb.Append(age.ToString()); chsb.Append(" "); chsb.Append(gender); chsb.Append(" "); chsb.Append(phone); chsb.Append(" "); chsb.Append(spellName); chsb.Append("\r\n"); } } if (INMan == "1") { for (int i = 0; i < FareCount; i++) { fareType = "IN"; AppPub.RandomName.RandomBuildFareInfo(fareType, ref fname, ref idcardType, ref idcard, ref birthday, ref gender, ref age, ref phone, ref spellName); insb.Append(" "); insb.Append(fname); insb.Append(" "); insb.Append(idcard); insb.Append(" "); insb.Append(birthday); insb.Append(" "); insb.Append(age.ToString()); insb.Append(" "); insb.Append(gender); insb.Append(" "); insb.Append(phone); insb.Append(" "); insb.Append(spellName); insb.Append("\r\n"); } } rB.Text = "成人旅客信息:\r\n" + adsb.ToString() + "\r\n\r\n" + "儿童旅客信息:\r\n" + chsb.ToString() + "\r\n\r\n" + "婴儿旅客信息:\r\n" + insb.ToString() + "\r\n\r\n"; }
private bool ShowAstrict() { WinOften.MessShow("该功能正在建设中,暂时无法使用!"); return(false); }
public bool IsRunOper() { string sname = tbSpiderName.Text.Trim(); if (sname == "") { WinOften.MessShow("名称不能为空!", 1); return(false); } string onum = tbOrderNum.Text.Trim(); if (!Often.IsInt32(onum)) { WinOften.MessShow("排序必须是数字!", 1); return(false); } string ulist = rTBUrlList.Text.Trim(); if (ulist == "") { WinOften.MessShow("Url列表不能为空!", 1); return(false); } string urule = rTBUrlRule.Text.Trim(); if (urule == "") { WinOften.MessShow("内容Url匹配规则不能为空!", 1); return(false); } if (rBIsSaveHtmla.Checked) { string hsp = tbHtmlSavePath.Text.Trim(); if (hsp == "") { WinOften.MessShow("html文件保存路径不能为空!", 1); return(false); } if (!Directory.Exists(hsp)) { WinOften.MessShow("html文件保存路径不存在!", 1); return(false); } } string esp = tbExcelSavePath.Text.Trim(); if (esp == "") { WinOften.MessShow("Excel文件保存路径不能为空!", 1); return(false); } if (!Directory.Exists(esp)) { WinOften.MessShow("Excel文件保存路径不存在!", 1); return(false); } string gmn = tbGatherMaxNum.Text.Trim(); if (!Often.IsInt32(gmn)) { WinOften.MessShow("一次最大采集数量必须是数字!", 1); return(false); } int gmni = Convert.ToInt32(gmn); if (gmni < 0) { WinOften.MessShow("一次最大采集数量不能小于0!", 1); return(false); } return(true); }