private void btnUpload_Click(object sender, EventArgs e) { lbOutput.Items.Clear(); QsConfig config = new QsConfig(); config.ServerAddr = tbApiUrl.Text.Trim(); config.AdminId = tbUser.Text.Trim(); config.AdminPwd = tbPwd.Text.Trim(); QsClient client = new QsClient(config); Log("登录", "账号登录..."); if (client.Login()) { Log("登录", "账号登录...OK"); Log("上传", $"开始上传文件:{tbFile.Text.Trim()} ..."); if (client.UploadFile(tbFile.Text.Trim(), out var url)) { Log("上传成功", $"上传文件成功:{tbFile.Text.Trim()} ,文件远程访问地址:{url}"); } else { Log("上传失败", $"上传文件失败:{tbFile.Text.Trim()} ...Error"); } } else { Log("登录", "账号登录...Error"); Log("错误", "登录失败,上传停止"); } }
public void CharValue() { // Arrange char lChrExpectedValue = 'c'; // Act var lUnkResult = QsConfig.GetValue <char>("char"); // Assert Assert.AreEqual(lUnkResult, lChrExpectedValue); }
public void DoubleValue() { // Arrange double lDblExpectedValue = 1.5; // Act var lUnkResult = QsConfig.GetValue <double>("double"); // Assert Assert.AreEqual(lUnkResult, lDblExpectedValue); }
public void DecimalValue() { // Arrange decimal lDmlExpectedValue = 1.5m; // Act var lUnkResult = QsConfig.GetValue <decimal>("decimal"); // Assert Assert.AreEqual(lUnkResult, lDmlExpectedValue); }
public void LongValue() { // Arrange long lLonExpectedValue = 123456789; // Act var lUnkResult = QsConfig.GetValue <long>("long"); // Assert Assert.AreEqual(lUnkResult, lLonExpectedValue); }
public void FloatValue() { // Arrange float lFltExpectedValue = 1.5f; // Act var lUnkResult = QsConfig.GetValue <float>("float"); // Assert Assert.AreEqual(lUnkResult, lFltExpectedValue); }
public void EnumValue() { // Arrange TestEnum lEnmExpectedValue = TestEnum.ENUM_A; // Act var lUnkResult = QsConfig.GetValue <TestEnum>("enum"); // Assert Assert.AreEqual(lUnkResult, lEnmExpectedValue); }
public void IntValue() { // Arrange int lIntExpectedValue = 1; // Act var lUnkResult = QsConfig.GetValue <int>("int"); // Assert Assert.AreEqual(lUnkResult, lIntExpectedValue); }
public void StringValue() { // Arrange string lStrExpectedValue = "string"; // Act var lUnkResult = QsConfig.GetValue <string>("string"); // Assert Assert.AreEqual(lUnkResult, lStrExpectedValue); }
public void BooleanValue() { // Arrange bool lBolExpectedValue = true; // Act var lUnkResult = QsConfig.GetValue <bool>("bool"); // Assert Assert.AreEqual(lUnkResult, lBolExpectedValue); }
public void DateValue() { // Arrange DateTime lDtmExpectedValue = new DateTime(2017, 12, 13); // Act var lUnkResult = QsConfig.GetValue <DateTime>("date"); // Assert Assert.AreEqual(lUnkResult, lDtmExpectedValue); }
static QsLog() { try { mBolShowConsole = QsConfig.GetValue <bool>("ShowConsole"); mBolSaveEventLog = QsConfig.GetValue <bool>("SaveEventLog"); mBolFullLog = QsConfig.GetValue <bool>("FullLog"); mStrLogName = QsConfig.GetValue <string>("LogName"); mStrLogPath = QsConfig.GetValue <string>("LogPath"); } catch { //Ignore exceptions } }
public static string GetLocation() { return(QsConfig.GetValue <string>("CostCenter")); }
public static string GetFoodWhsCode() { return(QsConfig.GetValue <string>("FoodWarehouse")); }
public static string GetWhsCode() { return(QsConfig.GetValue <string>("AuctionsWarehouse")); }
public void NullConnectionString() { // Act var lUnkResult = QsConfig.GetConnectionString("NullConnection"); }
public void KeyNotFound() { QsConfig.GetValue <string>("NotFoundKey"); }
private string GetCostingCode() { return(QsConfig.GetValue <string>("CostCenter")); }