internal ProductoXProveedorDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; } if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { this.Locale = table.Locale; } if ((table.Namespace != table.DataSet.Namespace)) { this.Namespace = table.Namespace; } this.Prefix = table.Prefix; this.MinimumCapacity = table.MinimumCapacity; }
internal tbRelatoriosTodosCamposBDDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; } if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { this.Locale = table.Locale; } if ((table.Namespace != table.DataSet.Namespace)) { this.Namespace = table.Namespace; } this.Prefix = table.Prefix; this.MinimumCapacity = table.MinimumCapacity; }
internal vw_tote_traveler_detailsDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; } if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { this.Locale = table.Locale; } if ((table.Namespace != table.DataSet.Namespace)) { this.Namespace = table.Namespace; } this.Prefix = table.Prefix; this.MinimumCapacity = table.MinimumCapacity; }
internal dsReport_CorporateFindingsByProgramDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; } if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { this.Locale = table.Locale; } if ((table.Namespace != table.DataSet.Namespace)) { this.Namespace = table.Namespace; } this.Prefix = table.Prefix; this.MinimumCapacity = table.MinimumCapacity; }
internal CustomerAssetAllocationDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; } if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { this.Locale = table.Locale; } if ((table.Namespace != table.DataSet.Namespace)) { this.Namespace = table.Namespace; } this.Prefix = table.Prefix; this.MinimumCapacity = table.MinimumCapacity; }
internal CustomersDataTable(global::System.Data.DataTable table) { TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { CaseSensitive = table.CaseSensitive; } if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { Locale = table.Locale; } if ((table.Namespace != table.DataSet.Namespace)) { Namespace = table.Namespace; } Prefix = table.Prefix; MinimumCapacity = table.MinimumCapacity; }
internal StdSampInfoDataTable(global::System.Data.DataTable table) { base.New(); this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; } if ((table.Locale.ToString != table.DataSet.Locale.ToString)) { this.Locale = table.Locale; } if ((table.Namespace != table.DataSet.Namespace)) { this.Namespace = table.Namespace; } this.Prefix = table.Prefix; this.MinimumCapacity = table.MinimumCapacity; }
public void Serialization03Test() { // Create and initialize formatter: Sfmt.Soap.SoapFormatter formatter = new Sfmt.Soap.SoapFormatter(); formatter.AssemblyFormat = Sfmt.FormatterAssemblyStyle.Simple; // Create DS: global::System.Data.DataSet ds = new global::System.Data.DataSet(); global::System.Data.DataTable dt = ds.Tables.Add("SomeTable"); global::System.Data.DataColumn dc1 = dt.Columns.Add("ID", typeof(global::System.Int32)); ds.AcceptChanges(); // Create MockableCall: MockingProxy callee = new MockingProxy(typeof(Sample.FooBar), null, "m1"); MockableCall call = new MockableCall(callee, typeof(Sample.FooBar).GetMethod("SomeMethodWithInsAndOuts"), new object[] { 1, 2, null, 3 }); // Set dataset as callresult: call.SetCallResult(ds); Assert.IsNotNull(call.ReturnValue, "Test setup failure, test could not even be run !"); // Serialize call: MemoryStream buffer = new MemoryStream(); formatter.Serialize(buffer, call); // Reset buffer: buffer.Flush(); buffer.Position = 0; // Deserialize call: call = (MockableCall)formatter.Deserialize(buffer); // Verify results (expect returnValue to be non-null): Assert.IsNotNull(call); Assert.IsNotNull(call.ReturnValue, "ReturnValue is null, the old implementation issue has reoccured..."); Assert.IsTrue(call.ReturnValue is global::System.Data.DataSet, "What the heck ? returnValue should have been a dataset !"); }
public virtual void Initialize() { if ((this.Errors.HasErrors == false)) { bool namespaceValueAcquired = false; if (this.Session.ContainsKey("namespace")) { if ((typeof(string).IsAssignableFrom(this.Session["namespace"].GetType()) == false)) { this.Error("The type \'System.String\' of the parameter \'namespace\' did not match the type of t" + "he data passed to the template."); } else { this._namespaceField = ((string)(this.Session["namespace"])); namespaceValueAcquired = true; } } if ((namespaceValueAcquired == false)) { object data = global::System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("namespace"); if ((data != null)) { if ((typeof(string).IsAssignableFrom(data.GetType()) == false)) { this.Error("The type \'System.String\' of the parameter \'namespace\' did not match the type of t" + "he data passed to the template."); } else { this._namespaceField = ((string)(data)); } } } bool classNameValueAcquired = false; if (this.Session.ContainsKey("className")) { if ((typeof(string).IsAssignableFrom(this.Session["className"].GetType()) == false)) { this.Error("The type \'System.String\' of the parameter \'className\' did not match the type of t" + "he data passed to the template."); } else { this._classNameField = ((string)(this.Session["className"])); classNameValueAcquired = true; } } if ((classNameValueAcquired == false)) { object data = global::System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("className"); if ((data != null)) { if ((typeof(string).IsAssignableFrom(data.GetType()) == false)) { this.Error("The type \'System.String\' of the parameter \'className\' did not match the type of t" + "he data passed to the template."); } else { this._classNameField = ((string)(data)); } } } bool columnsValueAcquired = false; if (this.Session.ContainsKey("columns")) { if ((typeof(global::System.Data.DataTable).IsAssignableFrom(this.Session["columns"].GetType()) == false)) { this.Error("The type \'System.Data.DataTable\' of the parameter \'columns\' did not match the typ" + "e of the data passed to the template."); } else { this._columnsField = ((global::System.Data.DataTable)(this.Session["columns"])); columnsValueAcquired = true; } } if ((columnsValueAcquired == false)) { object data = global::System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("columns"); if ((data != null)) { if ((typeof(global::System.Data.DataTable).IsAssignableFrom(data.GetType()) == false)) { this.Error("The type \'System.Data.DataTable\' of the parameter \'columns\' did not match the typ" + "e of the data passed to the template."); } else { this._columnsField = ((global::System.Data.DataTable)(data)); } } } } }
public bool Test1(global::System.Data.DataTable obj) { return(obj.HasRows()); }
public bool Test1(global::System.Data.DataTable obj) { return(obj.LastRow() == null); }
internal static global::System.Reflection.MethodInfo GenerateMethod(global::System.Type objectType, int schemeId, global::System.Data.DataTable dtSource) { object[] args = new object[] { objectType, schemeId, dtSource }; global::System.Reflection.MethodInfo ret = ((global::System.Reflection.MethodInfo)(m_privateType.InvokeStatic("GenerateMethod", new System.Type[] { typeof(global::System.Type), typeof(int), typeof(global::System.Data.DataTable) }, args))); return(ret); }
/// <summary> /// 栏目页面 /// </summary> /// <param name="tag"></param> /// <param name="page"></param> /// <returns></returns> public void Category(string lang, string allcate) { string tag = null; int page = 1; Regex paramRegex = new Regex("/*([^/]+)/(p(\\d+).html)*$", RegexOptions.IgnoreCase); if (paramRegex.IsMatch(allcate)) { Match mc = paramRegex.Match(allcate); tag = mc.Groups[1].Value; //计算页吗:页码如:p3 if (mc.Groups[3].Value != "") { page = int.Parse(mc.Groups[3].Value); } } else { base.RenderNotfound(); return; } string html = String.Empty; Category category = cbll.Get(a => String.Compare(tag, a.Tag, true) == 0); if (category == null) { base.RenderNotfound(); return; } else { //获取路径 string categoryPath = ArchiveUtility.GetCategoryUrlPath(category); if (!allcate.StartsWith(categoryPath + "/")) { base.RenderNotfound(); return; } /********************************* * @ 单页,跳到第一个特殊文档, * @ 如果未设置则最新创建的文档, * @ 如未添加文档则返回404 *********************************/ if (category.ModuleID == (int)SysModuleType.CustomPage) { Archive a = bll.GetFirstSpecialArchive(category.ID); if (a == null) { global::System.Data.DataTable dt = bll.GetArchives(category.ID, 1); if (dt.Rows.Count == 1) { a = dt.Rows[0].ToEntity <Archive>(); } else { base.RenderNotfound("栏目下应确保有推荐的文档存在!"); return; } } Response.StatusCode = 302; Response.RedirectLocation = String.Format("/{0}/{1}/{2}.html", lang, categoryPath, String.IsNullOrEmpty(a.Alias) ? a.ID : a.Alias ); Response.End(); return; } html = cmsPage.GetCategory(category, page, lang); } base.Render(html); }
/// <summary> /// /// </summary> /// <param name="FieldsENameCName">字段名与别名的集合,把字段名换为别名,如果在集合找不到,即显示原字段名 格式 key:ID value:序号 </param> /// <param name="dt"></param> /// <param name="FileName"></param> public static void CreateExcel(Dictionary <string, string> FieldsENameCName, global::System.Data.DataTable dt, string FileName) { string[] Fields = new string[dt.Columns.Count]; for (int i = 0; i < Fields.Length; i++) { Fields[i] = dt.Columns[i].ColumnName; } try { HttpResponse resp; string[] headers = Fields; //string[] headers = new string[] { "投稿人", "作者", "来源", "单位", "时间", "文章标题", "栏目", "积分" }; resp = HttpContext.Current.Response; resp.ContentEncoding = global:: System.Text.Encoding.Default; resp.AppendHeader("Content-Disposition", "attachment;filename=" + FileName); //标题 内容 string colHeaders = "", ls_item = ""; int i = 0; DataRow[] myRow = dt.Select(""); //取得数据表各列标题,各标题之间以\t分割,最后一个列标题后加回车符 for (i = 0; i < headers.Length; i++) { if (FieldsENameCName != null && FieldsENameCName.ContainsKey(headers[i])) { colHeaders += FieldsENameCName[headers[i]] += "\t"; } else { colHeaders += headers[i] + "\t"; } } colHeaders += "\n"; //向HTTP输出流中写入取得的数据信息 resp.Write(colHeaders); //逐行处理数据 foreach (DataRow row in myRow) { //在当前行中,逐列获得数据,数据之间以\t分割,结束时加回车符\n for (i = 0; i < dt.Columns.Count; i++) { StringBuilder strSB = new StringBuilder(); //string tempStr = row[i].ToString().Replace("\r\n","|"); //string[] tempArr = tempStr.Split('|'); //if (tempArr.Length > 0) //{ // foreach (string str in tempArr) // { // strSB.Append(str); // } //} //else { // strSB.Append(tempStr); //} strSB.Append("\"" + row[i].ToString().Replace("\"", "\"\"") + "\""); ls_item += strSB.ToString() + "\t"; //当前行数据写入HTTP输出流,并且置空ls_item以便下行数据 } ls_item += "\n"; resp.Write(ls_item); ls_item = ""; } //写缓冲区中的数据到HTTP头文件中 resp.End(); } catch { } }
public bool Test1(global::System.Data.DataTable obj) { return(obj.ColumnsEnumerable().Count() > 0); }
internal TypedTable(global::System.Data.DataTable table) : base() { }