public static SRV_RegisterData GetSrvRegisterData(LOC_RegisterData local_regdata) { if (local_regdata == null) { return(null); } SRV_RegisterData srv_regdata = new SRV_RegisterData(); srv_regdata._conn_success = false; srv_regdata._failed_reason = SRV_RegisterData.FAILED_REASON.NONE; try { string json_data = "{\"token_key\":\"" + local_regdata.token_key + "\"}"; string result = WebComm.PostData("http://www.esg.co.th/XML-Exporter/get_registered_data.php", json_data); srv_regdata = JsonConvert.DeserializeObject <SRV_RegisterData>(result); } catch (Exception) { return(null); } return(srv_regdata); }
void Start() { if (theWebComm != null) { Debug.LogError("attempt to create two WebComm Objects"); return; } theWebComm = this; face = FaceSingleton.getFace(); // class-specific start memoryContentCache = new MemoryContentCache(face); fetchPrefix = new Name(FaceSingleton.getSpaceName()).append(fetchVerb); linkPrefix = new Name(FaceSingleton.getSpaceName()).append(linkVerb); FetchInterestHandler fh = new FetchInterestHandler(); memoryContentCache.registerPrefix(fetchPrefix, fh, fh); LinkInterestHandler lh = new LinkInterestHandler(this); face.registerPrefix(linkPrefix, lh, lh); }
public string GetFlowType(int typeID) { //typeID=0查询现金的资金类型,为1时查询银行相关的 string result = "{}"; string obj = ""; try { if (typeID == 0) { obj = JsonConvert.SerializeObject(WebComm.GetFundFlowTypeList_Cash().Where(c => c.InOutType == "in" || c.InOutType == "out")); } else if (typeID == 1) { obj = JsonConvert.SerializeObject(WebComm.GetFundFlowTypeList_Bank().Where(c => c.InOutType == "in" || c.InOutType == "out")); } else { obj = JsonConvert.SerializeObject(WebComm.GetFundFlowTypeList_Bank().Where(c => c.InOutType != "in" && c.InOutType != "out")); } result = WebComm.ReturnJsonForExterior(true, "获取资金类型成功!", obj); } catch (Exception ex) { result = WebComm.ReturnJsonForExterior(false, "获取资金类型失败!" + ex.Message, null); } return(result); }
public string GetUserBankList(int userID) { string result = "{}"; try { var list = from lu in db.UserBanks where lu.UserID == userID select new { userBankID = lu.ID, bankID = lu.BankID, bankName = lu.BankName, bankType = lu.BankCardType, money = lu.NowMoney, cardNo = lu.BankNo }; result = WebComm.ReturnJsonForExterior(true, "获取银行账户成功!", JsonConvert.SerializeObject(list)); } catch (Exception ex) { result = WebComm.ReturnJsonForExterior(false, "获取银行账户失败!" + ex.Message, "{}"); } return(result); }
public string DoCashAccounting(int userID, string ApplyDate, int FlowTypeID, string feeItemID, string feeItemName, string money, string cAdd) { string result = "{}"; try { //获取记账日期 string applyDate = ApplyDate; //获取流动资金类型 FundFlowType ffType = WebComm.GetFundFlowTypeList().Where(f => f.ID == FlowTypeID).Single(); string flowTypeID = ffType.ID.ToString(); //获取流动资金类型名称 string flowTypeName = ffType.Name; //获取类型 string InOutType = ffType.InOutType; //获取资金 string iMoney = money; string isJieKuan = flowTypeName.Contains("借") == true ? "Y" : "N"; //获取备注信息 string sql = "exec proc_AddCashAccouting '" + applyDate + "'," + flowTypeID + ",'" + flowTypeName + "','" + InOutType + "'," + feeItemID + ",'" + feeItemName + "'," + iMoney + "," + userID.ToString() + ",'" + isJieKuan + "','N','" + cAdd + "'"; LycSQLHelper.ExecuteCommand(CommandType.Text, sql); result = WebComm.ReturnJsonForExterior(true, "现金记账成功!", "{}"); } catch (Exception ex) { result = WebComm.ReturnJsonForExterior(false, "现金记账失败!" + ex.Message, "{}"); } return(result); }
public static SRV_RegisterData GetSrvRegisterData(string sernum, string hdd_serial) { if (sernum.Trim().Length < 12) { return(null); } //SRV_RegisterData srv_regdata = new SRV_RegisterData(); //srv_regdata._conn_success = false; //srv_regdata._failed_reason = SRV_RegisterData.FAILED_REASON.NONE; SRV_RegisterData srv_regdata = null; try { string json_data = "{\"sernum\":\"" + sernum.Trim() + "\","; json_data += "\"hdd_serial\":\"" + hdd_serial.Trim() + "\"}"; string result = WebComm.PostData("http://www.esg.co.th/XML-Exporter/get_registered_data.php", json_data); srv_regdata = JsonConvert.DeserializeObject <SRV_RegisterData>(result); } catch (Exception) { return(null); } return(srv_regdata); }
protected string Enctry(string pass, string str) { if (string.IsNullOrEmpty(str)) { Random random = new Random(); str = ((char)random.Next(65, 91)).ToString() + ((char)random.Next(65, 91)).ToString(); //随机产生两个字母 } return(str + WebComm.CreateMd5((str + WebComm.CreateMd5(pass)))); }
// matches to closests to center of match area (if one exists) // TODO: EGM would it be better to give an error and not match if two are in the radius? public void match(string devID, string[] fNameAndArgs) { print("matching"); Dictionary <string, Track> tracks = openPTrack.getTracks(); float bestDistSqr = matchRadius * matchRadius; Track bestTrack = null; foreach (Track track in tracks.Values) { Vector3 posLoc = track.getPosition(); float d = posLoc.x - matchLocationX; float distSqr = d * d; d = posLoc.z - matchLocationZ; distSqr += d * d; if (distSqr <= bestDistSqr) { bestDistSqr = distSqr; bestTrack = track; } else { print("dist to candidate: " + distSqr.ToString() + " " + track.id + "(x: " + posLoc.x.ToString() + ", z:" + posLoc.z.ToString() + ")"); } } if (bestTrack == null) { print("no match " + devID); string html = "<p = class=\"errorMsg\"><b>Please go to that special spot on the floor and click</b>: " + WebComm.expressionLink("Associate me with a track", "match") + "</p>"; WebComm.publishHtml(devID, html); } else { print("got a match"); devTrackDict [devID] = bestTrack.id; string html = "<p> Select an image to drop from your location (track ID: " + bestTrack.id + "):\n <ul>"; foreach (string fname in mediaFiles) { html += " <li>"; // can't use full path because we hit a length limit // work around for now // better solution add html append in addition to replace // and automatically cut up long html strings html += WebComm.expressionLink(fname, "drop," + fname); html += "</li>\n"; } html += " </ul>\n</p>\n"; try { WebComm.publishHtml(devID, html); } catch (Exception e) { Debug.LogError("exception publishign " + html); Debug.LogError(e); } //TODO: come up with better copy EGM } }
public string GetUserBankList(int userID, string bankName, string bankNo, string bankCardType, int pageSize, int currentPage) { string jsonResult = ""; try { //根据查询条件筛选数据 var userBankList = db.UserBanks.Where(c => c.UserID == userID).AsQueryable(); if (!string.IsNullOrEmpty(bankName)) { userBankList = userBankList.Where(c => c.BankName.Contains(bankName)); } if (!string.IsNullOrEmpty(bankNo)) { userBankList = userBankList.Where(c => c.BankNo.Contains(bankNo)); } if (!string.IsNullOrEmpty(bankCardType)) { userBankList = userBankList.Where(c => c.BankCardType.Contains(bankCardType)); } int records = userBankList.Count(); //将分页查询后的数据组织为可json序列化的对象 var jsonObj = new { pagesize = pageSize, totalRecords = records, currentpage = currentPage, rows = (from list in userBankList.OrderBy(c => c.BankID).Skip((currentPage - 1) * pageSize).Take(pageSize).ToList() select new { bankid = list.BankID, bankname = list.BankName, bankno = list.BankNo, bankcardtype = list.BankCardType, nowMoney = list.NowMoney } ).ToArray() }; if (records > 0) { jsonResult = WebComm.ReturnJsonForExterior(true, "获取数据成功!", JsonConvert.SerializeObject(jsonObj)); } else { jsonResult = WebComm.ReturnJsonForExterior(false, "获取数据失败!", null); } } catch (Exception ex) { jsonResult = WebComm.ReturnJsonForExterior(false, "获取数据错误!" + ex.Message, null); } return(jsonResult); }
public string GetFeeItem() { string result = "{}"; try { result = WebComm.ReturnJsonForExterior(true, "获取费用科目成功!", JsonConvert.SerializeObject(WebComm.GetFeeItemListByXml().Where(c => c.IsLast == true))); } catch (Exception ex) { result = WebComm.ReturnJsonForExterior(false, "获取费用科目失败!" + ex.Message, null); } return(result); }
/// <summary> /// 绑定用户账号类型 /// </summary> private void BindAccountType() { Dictionary <string, string> dataSource = new Dictionary <string, string>(); foreach (var item in WebComm.GetAccountListByXml()) { dataSource.Add(item.TypeID.ToString(), item.TypeName); } Dictionary <string, object> attrCardType = null; List <SelectListItem> itemList = null; WebComm.BindComBox(dataSource, out attrCardType, out itemList); ViewBag.attrAccountType = attrCardType; ViewBag.accountList = itemList; }
public string Edit(UserAccount ua) { try { User loginUser = Session[SessionList.FamilyManageUser.ToString()] as User; ua.ctypeName = WebComm.GetAccountListByXml().Where(c => c.TypeID == int.Parse(Request.Form["ctypeID"])).SingleOrDefault().TypeName; db.Entry(ua).State = EntityState.Modified; db.SaveChanges(); return(WebComm.ReturnAlertMessage(ActionReturnStatus.成功, "修改成功", "UserAccountList", "", CallBackType.none, "")); } catch (Exception ex) { return(WebComm.ReturnAlertMessage(ActionReturnStatus.失败, "修改失败" + ex.Message, "", "", CallBackType.none, "")); } }
/// <summary> /// 绑定用户下拉列表 /// </summary> private void BindComboxUser() { Dictionary <string, string> dataSource = new Dictionary <string, string>(); foreach (var item in db.Users.Where(c => c.cUserFlag == true).ToList()) { dataSource.Add(item.cUserCode.ToString(), item.cUserName); } Dictionary <string, object> attrCardType = null; List <SelectListItem> itemList = null; WebComm.BindComBox(dataSource, out attrCardType, out itemList); ViewBag.attruser = attrCardType; ViewBag.userList = itemList; }
void Start() { instance = this; SetHomeScreenActive(); webcomm = GetComponent <WebComm>(); userInfo = GetComponent <UserInformation>(); registerUser.onClick.AddListener(() => { SetRegisterActive(); }); loginUser.onClick.AddListener(() => { SetLoginActive(); }); }
public static bool IsServerConnected() { WebResult res = new WebResult(); res.result = false; try { string web_result = WebComm.PostData("http://www.esg.co.th/XML-Exporter/test_connection.php", ""); res = JsonConvert.DeserializeObject <WebResult>(web_result); } catch (Exception) { // do nothing. } return(res.result); }
public string Create(UserAccount ua) { try { User loginUser = Session[SessionList.FamilyManageUser.ToString()] as User; ua.UserID = loginUser.ID; ua.ctypeName = WebComm.GetAccountListByXml().Where(c => c.TypeID == int.Parse(Request.Form["ctypeID"])).SingleOrDefault().TypeName; db.UserAccounts.Add(ua); db.SaveChanges(); return(WebComm.ReturnAlertMessage(ActionReturnStatus.成功, "添加成功", "UserAccountList", "", CallBackType.none, "")); } catch (Exception ex) { return(WebComm.ReturnAlertMessage(ActionReturnStatus.失败, "添加失败!" + ex.Message, "", "", CallBackType.none, "")); } }
private void moneyView() { //uNo uName uDate uNumber uRate uTotal delYn regDate modDate ArrayList list = new ArrayList(); list.Add(new lvSet(this, "view", 960, 700, 120, 60, list_Click)); lv = ct.listview((lvSet)list[0]); Controls.Add(lv); lv.Columns.Add("번호", 65, HorizontalAlignment.Center); lv.Columns.Add("날짜", 215, HorizontalAlignment.Center); lv.Columns.Add("메뉴", 215, HorizontalAlignment.Center); lv.Columns.Add("수량", 115, HorizontalAlignment.Center); lv.Columns.Add("금액", 175, HorizontalAlignment.Center); lv.Columns.Add("등록자", 175, HorizontalAlignment.Center); api = new WebComm(); api.SelectListView("http://192.168.3.28:5000/cm_init", lv); }
private void ok_Click(object sender, EventArgs e) { int a = dt1.Text.Substring(0, 10).CompareTo(dt2.Text.Substring(0, 10)); // 시작날짜가 종료날짜보다 클때 에러처리 if (a == 1) { MessageBox.Show("정확한 날짜를 입력바랍니다."); } else { Hashtable ht = new Hashtable(); api = new WebComm(); ht.Add("spName", "select_date"); ht.Add("start", dt1.Text.Substring(0, 10)); ht.Add("end", dt2.Text.Substring(0, 10)); ArrayList list = api.Select("http://192.168.3.15:5000/sel_date", ht); api.ListView(lv, list); Hashtable pro = new Hashtable(); pro.Add("spName", "total_Money"); pro.Add("start", dt1.Text.Substring(0, 10)); pro.Add("end", dt2.Text.Substring(0, 10)); ArrayList money = api.Select("http://192.168.3.15:5000/sel_date", pro); string[] arr2 = api.str(money); // 총가격 if (arr2[0] == "") { label2.Text = "총 금액: 0원"; } else { ls1 = new lbSet(this, "lb2", arr2[0] + "원", 600, 50, 650, 11, 30); label2.Text = "총 금액: " + arr2[0] + "원"; label2.Font = new Font(FontFamily.GenericSansSerif, 25.0F, FontStyle.Bold); } Controls.Add(label2); } }
// Rigidbody theBlimpRigidbody; // Use this for initialization void Start() { openPTrack = GetComponent <OpenPTrackProvider> (); imageDropScript = GetComponent <ImageDrop> (); // GameObject theBlimp = GameObject.Find ("Blimp"); // theBlimpRigidbody = theBlimp.GetComponent<Rigidbody> (); WebComm.addRFC("match", match); WebComm.addRFC("drop", drop); DirectoryInfo dir = new DirectoryInfo(mediaFolderPath); FileInfo[] fileInfo = dir.GetFiles("*.*"); mediaDirectory = dir.FullName; mediaFiles = new string[fileInfo.Length]; for (int i = 0; i < mediaFiles.Length; i++) { mediaFiles [i] = fileInfo[i].Name; } }
public string DoZhuanZhang(int userID, string ApplyDate, int FlowTypeID, string feeItemID, string feeItemName, string money, string inUBID, string outUBID, string cAdd) { string result = "{}"; try { //获取记账日期 string applyDate = ApplyDate; //获取流动资金类型 FundFlowType ffType = WebComm.GetFundFlowTypeList().Where(f => f.ID == FlowTypeID).Single(); string flowTypeID = ffType.ID.ToString(); //获取流动资金类型名称 string flowTypeName = ffType.Name; //获取类型 string InOutType = ffType.InOutType; //获取资金 string iMoney = money; //获取入账银行信息 string inUserBankID = inUBID; //获取出账银行信息 string outUserBankID = outUBID; //获取备注信息 string sql = "exec proc_CashChange '" + applyDate + "'," + flowTypeID + ",'" + flowTypeName + "','" + InOutType + "'," + iMoney + "," + userID.ToString() + "," + inUserBankID + "," + outUserBankID + ",'" + cAdd + "'"; LycSQLHelper.ExecuteCommand(CommandType.Text, sql); result = WebComm.ReturnJsonForExterior(true, "转账记账成功!", "{}"); } catch (Exception ex) { result = WebComm.ReturnJsonForExterior(false, "转账记账失败!" + ex.Message, "{}"); } return(result); }
public string DeleteConfirmed() { try { string ids = Request["ids"] ?? ""; int[] idList = WebComm.GetIntArrayByString(ids); foreach (int item in idList) { UserAccount ua = db.UserAccounts.Find(item); if (ua != null) { db.UserAccounts.Remove(ua); } } db.SaveChanges(); return(WebComm.ReturnAlertMessage(ActionReturnStatus.成功, "删除成功", "UserAccountList", "", CallBackType.none, "")); } catch (Exception ex) { return(WebComm.ReturnAlertMessage(ActionReturnStatus.失败, "删除失败!" + ex.Message, "", "", CallBackType.none, "")); } }
public string UserLogin(int userCode, string userPwd) { string jsonResult = ""; FamilyManagerWeb.Models.User user = db.Users.Where(c => c.cUserCode == userCode && c.cUserPwd == userPwd).SingleOrDefault(); string jsonObj = ""; if (user != null && user.cUserFlag == true) { jsonObj = "{\"userID\":" + user.ID + ",\"userCode\":\"" + user.cUserCode + "\",\"userName\":\"" + user.cUserName + "\",\"userPwd\":\"" + userPwd + "\"}"; jsonResult = WebComm.ReturnJsonForExterior(true, "登陆成功!", jsonObj); } else if (user == null) { jsonResult = WebComm.ReturnJsonForExterior(false, "用户名或密码错误!", null); } else { jsonResult = WebComm.ReturnJsonForExterior(false, "用户已无效!", null); } return(jsonResult); }
private void Combo_SelectedIndexChanged(object sender, EventArgs e) // 콤보박스 이벤트 { ComboBox combo = (ComboBox)sender; WebComm api = new WebComm(); string index = (string)combo.SelectedItem; if (index == "1분기") { if (tb.Text != "") { //api.Post2("http://192.168.3.15:5000/insert_CM"); // 결제버튼 클릭 시 매출관리 테이블에 추가 start = tb.Text + "-1-1"; end = tb.Text + "-3-31"; } } else if (index == "2분기") { if (tb.Text != "") { start = tb.Text + "-4-1"; end = tb.Text + "-6-30"; } } else if (index == "3분기") { if (tb.Text != "") { start = tb.Text + "-7-1"; end = tb.Text + "-9-30"; } } else if (index == "4분기") { if (tb.Text != "") { start = tb.Text + "-10-1"; end = tb.Text + "-12-31"; } } Hashtable pcd = new Hashtable(); pcd.Add("spName", "sel_Rank"); pcd.Add("start", start); pcd.Add("end", end); list = api.Select("http://192.168.3.15:5000/sel_date", pcd); if (list.Count == 0) { MessageBox.Show("데이터값이 없습니다."); } else { panel_clear(); get_chart(); array = api.Cut(list); for (int i = 0; i < 6; i++) { switch (i) { case 0: chart1.Series["Series1"].Points.Clear(); chart1.Titles.Add("파스타"); for (int j = 0; j < list.Count; j++) { if (array[j * 3].ToString() == "1") { chart1.Series["Series1"].Points.AddXY(array[(j * 3) + 1].ToString(), array[(j * 3) + 2].ToString()); } } break; case 1: chart2.Series["Series1"].Points.Clear(); chart2.Titles.Add("스테이크"); for (int j = 0; j < list.Count; j++) { if (array[j * 3].ToString() == "2") { chart2.Series["Series1"].Points.AddXY(array[(j * 3) + 1].ToString(), array[(j * 3) + 2].ToString()); } } break; case 2: chart3.Series["Series1"].Points.Clear(); chart3.Titles.Add("샐러드"); for (int j = 0; j < list.Count; j++) { if (array[j * 3].ToString() == "3") { chart3.Series["Series1"].Points.AddXY(array[(j * 3) + 1].ToString(), array[(j * 3) + 2].ToString()); } } break; case 3: chart4.Series["Series1"].Points.Clear(); chart4.Titles.Add("디저트"); for (int j = 0; j < list.Count; j++) { if (array[j * 3].ToString() == "4") { chart4.Series["Series1"].Points.AddXY(array[(j * 3) + 1].ToString(), array[(j * 3) + 2].ToString()); } } break; case 4: chart5.Series["Series1"].Points.Clear(); chart5.Titles.Add("음료"); for (int j = 0; j < list.Count; j++) { if (array[j * 3].ToString() == "5") { chart5.Series["Series1"].Points.AddXY(array[(j * 3) + 1].ToString(), array[(j * 3) + 2].ToString()); } } break; case 5: chart6.Series["Series1"].Points.Clear(); chart6.Titles.Add("사이드"); for (int j = 0; j < list.Count; j++) { if (array[j * 3].ToString() == "6") { chart6.Series["Series1"].Points.AddXY(array[(j * 3) + 1].ToString(), array[(j * 3) + 2].ToString()); } } break; } } } }
private void btnOK_Click(object sender, EventArgs e) { LoadingScreen ls = new LoadingScreen(); ls.ShowCenterParent(this); SRV_RegisterData srv_regdata = new SRV_RegisterData(); srv_regdata._conn_success = false; srv_regdata._failed_reason = SRV_RegisterData.FAILED_REASON.NONE; LOC_RegisterData loc_regdata = new LOC_RegisterData(); BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += delegate { DriveInformation drive = Licensing.GetDriveInfo(); //loc_regdata.token_key = Licensing.CalcMD5(drive.hddSerialNumber); //loc_regdata.machine_code = drive.hddSerialNumber; loc_regdata.token_key = Licensing.CalcMD5(Licensing.GetHDDSerialNumber(Licensing.GetSystemDriveLetter())); loc_regdata.machine_code = Licensing.GetHDDSerialNumber(Licensing.GetSystemDriveLetter()); loc_regdata.comp_name = Licensing.GetServerCompName(); loc_regdata.reg_type = (Licensing.IsLAN() ? "LAN" : "LOCAL"); loc_regdata.sernum = this.sernum; loc_regdata.contact = this.contact; loc_regdata.telnum = this.telnum; loc_regdata.email = this.email; loc_regdata.remark = this.remark; loc_regdata.slip_filename = Path.GetFileName(this.slip_file_path); loc_regdata.tax_filename = Path.GetFileName(this.tax_file_path); NameValueCollection nvc = new NameValueCollection(); nvc.Add("token_key", loc_regdata.token_key); nvc.Add("machine_code", loc_regdata.machine_code); nvc.Add("comp_name", loc_regdata.comp_name); nvc.Add("reg_type", loc_regdata.reg_type); nvc.Add("sernum", loc_regdata.sernum); nvc.Add("contact", loc_regdata.contact); nvc.Add("telnum", loc_regdata.telnum); nvc.Add("email", loc_regdata.email); nvc.Add("remark", loc_regdata.remark); nvc.Add("slip_filename", loc_regdata.slip_filename); try { string upload_tax_result = WebComm.UploadMultipart("http://www.esg.co.th/XML-Exporter/upload_tax_file.php", this.tax_file_path, "file1", "image/jpg", nvc); ServerResult sr = JsonConvert.DeserializeObject <ServerResult>(upload_tax_result); nvc.Add("tax_filename", sr.message); string web_result = WebComm.UploadMultipart("http://www.esg.co.th/XML-Exporter/upload_register.php", this.slip_file_path, "file1", "image/jpg", nvc); //WebResult web_result = WebComm.UploadMultipart("http://www.weetee.com:3636/XML-Exporter/upload.php", this.file_path, "file1", "image/jpg", nvc); srv_regdata = JsonConvert.DeserializeObject <SRV_RegisterData>(web_result); //loc_regdata.status_code = srv_regdata.status_code; //loc_regdata.status = srv_regdata.status; loc_regdata.reg_date = DateTime.Parse(srv_regdata.reg_date, CultureInfo.GetCultureInfo("en-US").DateTimeFormat); loc_regdata.reg_time = srv_regdata.reg_time; loc_regdata.reg_unixtime = srv_regdata.reg_unixtime; } catch (Exception ex) { srv_regdata._conn_success = false; } }; worker.RunWorkerCompleted += delegate { ls.Close(); if (srv_regdata._conn_success) { if ((int)srv_regdata._failed_reason == (int)SRV_RegisterData.FAILED_REASON.NONE) { //if (Licensing.WriteTokenKey(loc_regdata.token_key, loc_regdata.machine_code, loc_regdata.comp_name, loc_regdata.reg_type, loc_regdata.sernum, loc_regdata.contact, loc_regdata.telnum, loc_regdata.email, loc_regdata.remark, loc_regdata.slip_filename, loc_regdata.status_code, loc_regdata.status, loc_regdata.reg_date.ToString("yyyy-MM-dd", CultureInfo.GetCultureInfo("en-US")), loc_regdata.reg_time, loc_regdata.reg_unixtime)) if (Licensing.WriteTokenKey(loc_regdata.token_key, loc_regdata.machine_code, loc_regdata.comp_name, loc_regdata.reg_type, loc_regdata.sernum, loc_regdata.contact, loc_regdata.telnum, loc_regdata.email, loc_regdata.remark, loc_regdata.slip_filename, loc_regdata.reg_date.ToString("yyyy-MM-dd", CultureInfo.GetCultureInfo("en-US")), loc_regdata.reg_time, loc_regdata.reg_unixtime)) { MessageBox.Show("ส่งข้อมูลการลงทะเบียนโปรแกรมเรียบร้อย, เมื่อข้อมูลดังกล่าวได้รับการตรวจสอบจากทางบริษัทฯ แล้ว ท่านจะสามารถใช้งานความสามารถทั้งหมดของโปรแกรมได้ในทันที\n(โดยปกติใช้เวลาไม่เกิน 1 วันทำการ)"); this.DialogResult = DialogResult.OK; this.Close(); } return; } if ((int)srv_regdata._failed_reason == (int)SRV_RegisterData.FAILED_REASON.DUPLICATE_SN) { MessageBox.Show(srv_regdata._failed_reason.ToReasonString()); return; } } if (!srv_regdata._conn_success && srv_regdata._failed_reason == SRV_RegisterData.FAILED_REASON.NONE) { MessageBox.Show("ไม่สามารถส่งข้อมูลการลงทะเบียนได้, กรุณาตรวจสอบการเชื่อมต่ออินเทอร์เน็ต", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } }; worker.RunWorkerAsync(); }
public LinkInterestHandler(WebComm webComm) { this.webComm = webComm; }