换地方工作,我的CSDN博客怎么打不开,一些东西先记到这吧:
js重锚点并刷新页面
<script type="text/javascript">
    var url = location.href;
//aflag是父页面传的锚点
if (url.indexOf("aflag") > 0) {
    url = url.substring(0, url.indexOf("aflag") - 1);
}
if (url.indexOf("#") > 0) {
    url = url.substring(0, url.indexOf("#"));
}
if("<%=aflag %>"!="")
{
location.href=url+"#<%=aflag %>";
}
</script>父页面传值:
 var url = parent.location.href;
 if (url.indexOf(""aflag"") > 0) {
  url = url.substring(0, url.indexOf(""aflag"") - 1);
 }
 if (url.indexOf(""#"") > 0) {
  url = url.substring(0, url.indexOf(""#""));
 }
 parent.location.href=url+'&aflag=" + VendItemId + @"'; //四舍五入 v表示要转换的值  e表示要保留的位数 
        function round(v, e) {
            var t = 1;
            for (; e > 0; t *= 10, e--);
            for (; e < 0; t /= 10, e++);
            return Math.round(v * t) / t;
        }
/// <summary>
        /// 执行添加事务
        /// </summary>
        /// <param name="sqls"></param>
        /// <returns></returns>
        public int AddList(List<String> sqls)
        {            return DbHelperSQL.ExecuteSqlTran(sqls);
        }BLL.cs
/// <summary>
        /// 执行添加事务
        /// </summary>
        /// <param name="sqls"></param>
        /// <returns></returns>
        public bool AddList(List<M_Pact_ItemMoney> list)
        {            List<String> sqls = new List<String>();
            foreach (M_Pact_ItemMoney model in list)
            {                sqls.Add(@" insert into Pact_ItemMoney(PactCode,ItemName,ItemCent) 
                            values 
                            ('" + model.PactCode + @"','" + model.ItemName + @"','" + model.ItemCent + @"')");
            }            if (dal.AddList(sqls) > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
sql添加字段并加备注、默认值ALTER TABLE Pact ADD ReceiveOtherPrice numeric(18,2) default 0
GO
EXEC sp_addextendedproperty 'MS_Description', @value=N'验收其他费用' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Pact', @level2type=N'COLUMN', @level2name=N'ReceiveOtherPrice'

解决方案 »

  1.   

    css,table带边框:<table bordercolor="#000000" style="border-right: #000000 1px solid; border-top: #000000 2px solid; border-left: #000000 2px solid; border-bottom: #000000 1px solid"  cellspacing="0" width="100%" class="ProductFont">
                <tr>
                <td width="9%" align="center" style="border-right: #000000 1px solid; border-bottom: #000000 1px solid;"><B>货物名称</B></td>
                <td width="9%" align="center" style="border-right: #000000 1px solid; border-bottom: #000000 1px solid;"><B>型 号</B></td>
                <td width="*" align="center" style="border-right: #000000 1px solid; border-bottom: #000000 1px solid;"><B>技术规格</B></td>
                <td width="5%" align="center" style="border-right: #000000 1px solid; border-bottom: #000000 1px solid;"><B>单位</B></td>
                <td width="9%" align="center" style="border-right: #000000 1px solid; border-bottom: #000000 1px solid;"><B>单价(元)</B></td>
                <td width="5%" align="center" style="border-right: #000000 1px solid; border-bottom: #000000 1px solid;"><B>数量</B></td>
                <td width="10%" align="center" style="border-right: #000000 1px solid; border-bottom: #000000 1px solid;"><B>总价(元)</B></td>
                </tr>
    </table>