public override string ToString() { var sb = new StringBuilder(WorldID); if (InstanceID > 0) { sb.Append(":"); sb.Append(InstanceID); switch (Type) { case InstancePrivacyType.FriendsOnly: sb.Append("~friends"); sb.Append(CreatorID.Enclose()); break; case InstancePrivacyType.Hidden: sb.Append("~hidden"); sb.Append(CreatorID.Enclose()); break; default: break; } if (!Nonce.IsNullOrEmpty()) { sb.Append("~nonce"); sb.Append(Nonce.Enclose()); } } return(sb.ToString()); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("creatorID: " + CreatorID.ToString()); sb.Append(" | creatorName: " + CreatorName); sb.Append(" | picName: " + PicName); return(sb.ToString()); }
public static void Save() { try { var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); Set(config, "CreatorID", CreatorID.ToNullableString()); Set(config, "CoordinatorID", CoordinatorID.ToNullableString()); Set(config, "BranchID", CoordinatorID.ToNullableString()); Set(config, "DeclaratorID", DeclaratorID.ToNullableString()); Set(config, "PaymentReceiverID", PaymentReceiverID.ToNullableString()); Set(config, "PaymentReceiverBankAccountID", PaymentReceiverBankAccountID.ToNullableString()); Set(config, "ProviderID", ProviderID.ToNullableString()); Set(config, "AppointmentServiceProviders", string.Join(";", AppointmentServiceProviders)); Set(config, "OurDiscountReal", OurDiscountReal.ToNullableString()); Set(config, "INS_Server", INS_Server.IfNullEmpty()); Set(config, "INS_Database", INS_Database.IfNullEmpty()); Set(config, "INS_User", INS_User.IfNullEmpty()); Set(config, "INS_Password", SymCryptoHelper.TripleDESEncrypt(INS_Password.IfNullEmpty(), Salt, Key, IV)); Set(config, "CRM_Server", CRM_Server.IfNullEmpty()); Set(config, "CRM_Database", CRM_Database.IfNullEmpty()); Set(config, "CRM_User", CRM_User.IfNullEmpty()); Set(config, "CRM_Password", SymCryptoHelper.TripleDESEncrypt(CRM_Password.IfNullEmpty(), Salt, Key, IV)); Set(config, "TakeCount", TakeCount.ToNullableString()); config.Save(); } catch (Exception ex) { throw new Exception("Error while saving configuration (see inner exception).", ex); } }
protected void btnImport_Click(object sender, ImageClickEventArgs e) { int pageIndex = 1; int pageCount = 10000; int totalCount = 0; string CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; //设置查询条件 string ddlStorage, SourceType, SourceNo, CreatorID, ProductID, StartDate, EndDate, BatchNo, EFindex, EFDesc, Specification, ColorID, Material, Manufacturer, Size, FromAddr, BarCode, ckbIsM = ""; ddlStorage = this.ddlStorage.SelectedValue; ProductID = this.hiddenProductID.Value; StartDate = this.txtStartDate.Text; EndDate = this.txtEndDate.Text; BatchNo = this.hiddenBatchNo.Value; SourceType = this.ddlSourceType.SelectedValue; SourceNo = this.txtSourceNo.Text; CreatorID = this.txtCreatorID.Value; EFindex = hiddenEFIndex.Value.Trim(); EFDesc = hiddenEFDesc.Value.Trim(); Specification = this.txt_Specification.Value; ColorID = this.sel_ColorID.SelectedValue; Material = this.sel_Material.SelectedValue; Manufacturer = this.txt_Manufacturer.Text; Size = this.txt_Size.Value; FromAddr = this.txt_FromAddr.Text; BarCode = this.txt_BarCode.Value; if (this.ckbIsM.Checked) { ckbIsM = "1"; } else { ckbIsM = "0"; } DataTable dt = new DataTable(); string QueryStr = " a.CompanyCD='" + CompanyCD + "' "; if (ddlStorage.Trim().Length > 0 && ddlStorage != "0") { QueryStr += " and a.StorageID= '"; QueryStr += ddlStorage; QueryStr += "' "; } if (ProductID.Trim().Length > 0) { QueryStr += " and a.ProductID= '"; QueryStr += ProductID; QueryStr += "' "; } if (StartDate.Trim().Length > 0) { QueryStr += " and a.HappenDate >='"; QueryStr += StartDate + " 00:00:00"; QueryStr += "' "; } if (EndDate.Trim().Length > 0) { QueryStr += " and a.HappenDate <='"; QueryStr += EndDate + " 23:59:59"; QueryStr += "' "; } if (BatchNo != "0") { if (BatchNo == "未设置批次" || string.IsNullOrEmpty(BatchNo)) { QueryStr += " and ( a.BatchNo is null or a.BatchNo='') "; } else { QueryStr += " and a.BatchNo='" + BatchNo + "' "; } } if (SourceType.Trim().Length > 0 && SourceType != "0") { QueryStr += " and a.BillType= '"; QueryStr += SourceType; QueryStr += "' "; } if (SourceNo.Trim().Length > 0 && SourceNo != "0") { if (ckbIsM == "0") { QueryStr += " and a.BillNo= '"; QueryStr += SourceNo; QueryStr += "' "; } else { QueryStr += " and a.BillNo like '%"; QueryStr += SourceNo; QueryStr += "%' "; } } if (CreatorID.Trim().Length > 0 && CreatorID != "0") { QueryStr += " and a.Creator= '"; QueryStr += CreatorID; QueryStr += "' "; } if (!string.IsNullOrEmpty(EFindex) && !string.IsNullOrEmpty(EFDesc)) { QueryStr += " and b.ExtField" + EFindex + " LIKE '%" + EFDesc + "%' "; } if (!string.IsNullOrEmpty(Specification)) { QueryStr += " and b.Specification LIKE '%" + Specification + "%' "; } if (!string.IsNullOrEmpty(ColorID) && ColorID != "0") { QueryStr += " and b.ColorID= '" + ColorID + "' "; } if (!string.IsNullOrEmpty(Material) && Material != "0") { QueryStr += " and b.Material = '" + Material + "' "; } if (!string.IsNullOrEmpty(Manufacturer)) { QueryStr += " and b.Manufacturer LIKE '%" + Manufacturer + "%' "; } if (!string.IsNullOrEmpty(Size)) { QueryStr += " and b.Size LIKE '%" + Size + "%' "; } if (!string.IsNullOrEmpty(FromAddr)) { QueryStr += " and b.FromAddr LIKE '%" + FromAddr + "%' "; } if (!string.IsNullOrEmpty(BarCode)) { QueryStr += " and b.BarCode LIKE '%" + BarCode + "%' "; } //查询数据 //DataTable dt = AcountBookBus.GetAcountBookInfo(QueryStr); dt = StrongeJournalBus.GetDetailStrongJournal(QueryStr, pageIndex, pageCount, " ProductID desc", ref totalCount); OutputToExecl.ExportToTableFormat(this, dt, new string[] { "单据编号", "单据类别", "仓库编号", "仓库名称", "批次", "物品编号", "物品名称", "单位", "规格型号", "颜色", "尺寸", "产地", "出入库时间", "出入库数量", "结存量", "创建人", "备注" }, new string[] { "BillNo", "typeflag", "StorageNo", "StorageName", "BatchNo", "ProdNo", "ProductName", "CodeName", "Specification", "ColorName", "ProductSize", "FromAddr", "EnterDate", "ProductCount", "NowProductCount", "CreatorName", "ReMark" }, "库存流水账明细"); }