public string WriteMsg() { if (Phone.Trim().Length > 11) { return("预警责任人号码读取非法!"); } if (Phone.Trim() != "" && Tools.GetTest(Phone.Trim()) != "数字") { return("预警责任人号码读取非法!"); } UserDataAll += SerialNumber.ToString("X").PadLeft(4, '0'); UserDataAll += SendTime.ToString("yyMMddHHmmss").PadLeft(12, '0'); UserDataAll += OrderNum.ToString("X").PadLeft(2, '0'); UserDataAll += HexStringUtility.StrToHexString(Phone.Trim()); byte[] UserDataBytesAllTmp; WaterBaseMessage[] MsgListTmp; string msg = WaterBaseMessageService.GetMsgList_WriteMsg(this, UserDataAll, out UserDataBytesAllTmp, out MsgListTmp); if (msg == "") { UserDataBytesAll = UserDataBytesAllTmp; MsgList = MsgListTmp; } else { if (ShowLog) { logHelper.Error(msg); } } return(msg); }
private void ChangeButtonText() { if (OrderNum == TotalOrderNum) { LoadMoreButtonText = OrderNum.ToString() + "/" + TotalOrderNum.ToString() + "," + "已全部加载"; ButtonIsEnable = false; } else { LoadMoreButtonText = OrderNum.ToString() + "/" + TotalOrderNum.ToString() + "," + "点击加载更多"; ButtonIsEnable = true; } }
public string GetFullOrderString() { string format = "\t{0,10:c}"; string result = new string('*', 27); result += "\n" + OrderNum.ToString() + " | " + Date.ToShortDateString(); result += "\n" + Name; result += "\n" + StateAbbr; result += "\n" + "Product:" + string.Format(format, ProductType); result += "\n" + "Materials:" + string.Format(format, MaterialCost); result += "\n" + "Labor:\t" + string.Format(format, LaborCost); result += "\n" + "Tax:\t" + string.Format(format, TaxTotal); result += "\n" + "Total:\t" + string.Format(format, Total); result += "\n" + new string('*', 27); return(result); }
public string WriteMsg() { if (Phone.Trim().Length > 11) { return("预警责任人号码修改非法!"); } if (Phone.Trim() != "" && Tools.GetTest(Phone.Trim()) != "数字") { return("预警责任人号码修改非法!"); } UserData = ""; UserData += SerialNumber.ToString("X").PadLeft(4, '0'); UserData += SendTime.ToString("yyMMddHHmmss").PadLeft(12, '0'); UserData += OrderNum.ToString("X").PadLeft(2, '0'); UserData += HexStringUtility.StrToHexString(Phone.Trim()); UserDataBytes = HexStringUtility.HexStringToByteArray(UserData); return(WriteMsgBase()); }