123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Data;
- using SysBaseLibs;
- using System.Web.Script.Serialization;
- using System.Web.UI.HtmlControls;
- namespace SysDataLibs.TableClass
- {
- public partial class MarketSellers_info
- {
- /// <summary>
- /// 证照信息
- /// </summary>
- /// <param name="poTable"></param>
- /// <param name="sellerId"></param>
- /// <param name="poSession"></param>
- //public static void PrintMarketSellerWarrantInfo(HtmlTable poTable, string SellerID, UserSession poSession)
- //{
- // if (poTable != null && SellerID.Trim().Length > 0 && poSession != null && poSession.DBConn != null)
- // {
- // string lcSql = "select * from " + Tn.SellerHasWarrant + " where " + SellerHasWarrant_info.cSellerID + "=" + SellerID + "";
- // rsQuery loQuery = poSession.DBConn.OpenQuery(lcSql);
- // //行标题
- // HtmlTableRow loRow = new HtmlTableRow();
- // HtmlTableCell loCell = new HtmlTableCell();
- // string lcColor = "#ffffff";
- // loRow.Height = "20";
- // loCell.Attributes.Add("bgcolor", "#8caae7");
- // loCell.ColSpan = 7;
- // loCell.Align = "center";
- // loCell.InnerHtml = " <strong><span style='font-size: 11pt'>证照信息</span></strong> ";
- // loRow.Cells.Add(loCell);
- // //
- // poTable.Rows.Add(loRow);
- // //列标题
- // loRow = new HtmlTableRow();
- // loRow.Height = "19";
- // lcColor = "#c6dbff";
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("bgcolor", lcColor);
- // loCell.Align = "center";
- // loCell.InnerHtml = "<strong>编号</strong>";
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("bgcolor", lcColor);
- // loCell.ColSpan = 2;
- // loCell.Align = "center";
- // loCell.InnerHtml = "<strong>证件名称</strong>";
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("bgcolor", lcColor);
- // //loCell.ColSpan = 2;
- // loCell.Align = "center";
- // loCell.InnerHtml = "<strong>证件号码</strong>";
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("bgcolor", lcColor);
- // //loCell.ColSpan = 7;
- // loCell.Align = "center";
- // loCell.InnerHtml = "<strong>起始日期</strong>";
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("bgcolor", lcColor);
- // //loCell.ColSpan = 7;
- // loCell.Align = "center";
- // loCell.InnerHtml = "<strong>截止日期</strong>";
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("bgcolor", lcColor);
- // //loCell.ColSpan = 7;
- // loCell.Align = "center";
- // loCell.InnerHtml = "<strong>附件</strong>";
- // loRow.Cells.Add(loCell);
- // //
- // poTable.Rows.Add(loRow);
- // if (loQuery != null && loQuery.IsOpened && loQuery.RecCount > 0)
- // {
- // //----------------------------------------------------------
- // loQuery.SortBy(SellerHasWarrant_info.cValidEndTime, false);
- // loQuery.MoveFirst();
- // for (int i = 0; i < loQuery.RecCount; i++)
- // {
- // lcColor = "#ffffff";
- // loRow = new HtmlTableRow();
- // loRow.Height = "19";
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("bgcolor", lcColor);
- // loCell.Align = "center";
- // loCell.InnerText = (i + 1) + "";
- // loRow.Cells.Add(loCell);
- // //证件类型
- // loCell = new HtmlTableCell();
- // loCell.Align = "center";
- // string lcTitle = loQuery.GetString("WarrantTypeID");
- // WarrantType_info LTbl = new WarrantType_info();
- // string lcErrMsg = "";
- // lcSql = "select * from " + Tn.WarrantType + " where " + WarrantType_info.cWarrantTypeID + " =" + lcTitle + " ";
- // SysDataLibs.AppEnv.GetTableInfo(lcSql, LTbl, poSession.DBConn, ref lcErrMsg);
- // loCell.ColSpan = 2;
- // lcSql = "select " + Sys_Status_info.cDisplayValue + " from " + Tn.Sys_Status;
- // string tempc2 = loQuery.GetString("WarrantStyle").Trim();
- // //从 cn_SysStatus 里获取相应值
- // lcSql += " where TableName='SellerHasWarrant' and ColName='WarrantStyle' and CodeValue ='" + tempc2 + "'";
- // string tempc3 = SysDataLibs.AppEnv.GetTextWithSQL(lcSql, Sys_Status_info.cDisplayValue, poSession.DBConn);
- // //tempc2 =="1" 执照类别为 正式 则不显示
- // loCell.InnerText = LTbl.Name + (tempc2 == "1" ? "" : " [ " + tempc3 + " ]");//string.Format("<div id='row{0}'>{1}</div>\n", loQuery.GetString("WarrantTypeID"), lcTitle);
- // loCell.Attributes.Add("bgcolor", lcColor);
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // //loCell.ColSpan = 2;
- // loCell.Align = "center";
- // loCell.InnerText = loQuery.GetString("WarrantNumber");
- // loCell.Attributes.Add("bgcolor", lcColor);
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // loCell.Align = "center";
- // loCell.InnerText = string.Format("{0:d}", loQuery.GetDateTime("ValidStartTime"));
- // loCell.Attributes.Add("bgcolor", lcColor);
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // loCell.Align = "center";
- // loCell.InnerText = string.Format("{0:d}", loQuery.GetDateTime("ValidEndTime"));
- // loCell.Attributes.Add("bgcolor", lcColor);
- // loRow.Cells.Add(loCell);
- // string lcSql1 = "select * from Sys_AttachFiles where TableID= '" + Tn.SellerHasWarrant + "' and ColumnID='ID' AND SourceKey='" + loQuery.GetString("ID") + "'";
- // rsQuery loQry = poSession.DBConn.OpenQuery(lcSql1);
- // loCell = new HtmlTableCell();
- // loCell.Align = "center";
- // if (loQry != null && loQry.IsOpened && loQry.RecCount > 0)
- // {
- // Sys_AttachFiles_info loInfo = new Sys_AttachFiles_info(loQry.CurrentRow);
- // loCell.InnerHtml = "<a href='" + loInfo.DownPath() + "'>" + loInfo.FileTitle + "</a>";
- // }
- // loCell.Attributes.Add("bgcolor", lcColor);
- // loRow.Cells.Add(loCell);
- // poTable.Rows.Add(loRow);
- // loQuery.MoveNext();
- // }
- // }
- // else
- // {
- // //行标题
- // loRow = new HtmlTableRow();
- // loCell = new HtmlTableCell();
- // lcColor = "#ffffff";
- // loRow.Height = "19";
- // loCell.Attributes.Add("bgcolor", lcColor);
- // loCell.ColSpan = 7;
- // loCell.Align = "center";
- // loCell.InnerText = "没有相关记录";
- // loRow.Cells.Add(loCell);
- // //
- // poTable.Rows.Add(loRow);
- // }
- // }
- //}
- //信用评比情况
- //public static void PrintMarketSellerCreditInfo(HtmlTable poTable, string SellerID, UserSession poSession)
- //{
- // if (poTable != null && SellerID.Trim().Length > 0 && poSession != null && poSession.DBConn != null)
- // {
- // //行标题
- // HtmlTableRow loRow = new HtmlTableRow();
- // HtmlTableCell loCell = new HtmlTableCell();
- // string lcColor = "";
- // //loRow.Height = "20";
- // //loCell.Attributes.Add("bgcolor", "#8caae7");
- // loCell.ColSpan = 7;
- // loCell.Attributes.Add("class", "tdHeadTitleSmall");
- // loCell.Align = "center";
- // loCell.InnerHtml = "信用评比情况";
- // loRow.Cells.Add(loCell);
- // //
- // poTable.Rows.Add(loRow);
- // //列标题
- // loRow = new HtmlTableRow();
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("class", "tdTableHeader");
- // loCell.Align = "center";
- // loCell.InnerHtml = "序号";
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("class", "tdTableHeader");
- // loCell.ColSpan = 3;
- // loCell.InnerHtml = "信誉等级";
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("class", "tdTableHeader");
- // loCell.InnerHtml = "得分";
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // loCell.ColSpan = 2;
- // loCell.Attributes.Add("class", "tdTableHeader");
- // loCell.InnerHtml = "评级时间";
- // loRow.Cells.Add(loCell);
- // //
- // poTable.Rows.Add(loRow);
- // //获取近两年的记录
- // string lcSql = "select * from " + Tn.vwSellerEvalRpt + " where " + vwSellerEvalRpt_info.cSellerID + "=" + SellerID + " and " + vwSellerEvalRpt_info.cYear + "> '" + DateTime.Now.AddYears(-2).Year + "' order by Year Desc , Month desc ";
- // rsQuery loQuery = poSession.DBConn.OpenQuery(lcSql);
- // if (loQuery != null && loQuery.IsOpened && loQuery.RecCount > 0)
- // {
- // //loQuery.SortBy(vwSellerEvalRpt_info.cValidEndTime, false);
- // loQuery.MoveFirst();
- // for (int i = 0; i < loQuery.RecCount; i++)
- // {
- // lcColor = "#ffffff";
- // loRow = new HtmlTableRow();
- // loCell = new HtmlTableCell();
- // // loCell.Attributes.Add("class", "td2");
- // loCell.Align = "center";
- // loCell.InnerHtml = (i + 1) + "";
- // loRow.Cells.Add(loCell);
- // // 信誉等级
- // loCell = new HtmlTableCell();
- // // loCell.Attributes.Add("class", "td2");
- // loCell.ColSpan = 3;
- // loCell.Align = "center";
- // loCell.InnerHtml = SellerEvalGrade_info.GetRankByScore(loQuery.GetInt(vwSellerEvalRpt_info.cTotalScore));
- // loRow.Cells.Add(loCell);
- // // 信誉分值
- // loCell = new HtmlTableCell();
- // // loCell.Attributes.Add("class", "td2");
- // loCell.Align = "center";
- // loCell.InnerHtml = loQuery.GetInt(vwSellerEvalRpt_info.cTotalScore) + "";
- // loRow.Cells.Add(loCell);
- // loCell = new HtmlTableCell();
- // // loCell.Attributes.Add("class", "td2");
- // loCell.ColSpan = 2;
- // loCell.Align = "center";
- // loCell.InnerHtml = loQuery.GetString(vwSellerEvalRpt_info.cYear) + "年" + loQuery.GetString(vwSellerEvalRpt_info.cMonth) + "月";
- // loRow.Cells.Add(loCell);
- // poTable.Rows.Add(loRow);
- // loQuery.MoveNext();
- // }
- // }
- // else
- // {
- // //行标题
- // loRow = new HtmlTableRow();
- // loCell = new HtmlTableCell();
- // loCell.Attributes.Add("class", "td2");
- // loCell.ColSpan = 7;
- // loCell.Align = "center";
- // loCell.InnerHtml = "没有相关记录";
- // loRow.Cells.Add(loCell);
- // //
- // poTable.Rows.Add(loRow);
- // }
- // }
- //}
- //---日常经营行为记录
- public static string PrintMarketSellerViolations(string sellerId, UserSession poSession)
- {
- if (sellerId.Trim().Length > 0 && poSession?.DBConn != null)
- {
- string lcSql = "select * from " + Tn.SellerViolations + " where " + SellerViolations_info.cSellerID + "=" + sellerId;
- rsQuery loQuery = poSession.DBConn.OpenQuery(lcSql);
- if (loQuery.IsOpened && loQuery.RecCount > 0)
- return loQuery.CurrentTable.ToJson("yyyy-MM-dd");
- return "";
- }
- return "";
- }
- }
- }
|