• 0 

    2015-09-09一天一记

     
    1.ViewCustomerServiceInvoice theViewCustomerServiceInvoice =         ViewCustomerServiceInvoiceManager.Instance.ToEntity((e.Item.DataItem as DataRowView).Row);
    如何获取到DataTable中的行。
    2.foreach(Question currentQuestion in lstQuestion)
    {
    foreach(Quarter currentQuarter in lstQuarter){
    string id = string.Format("txtAnswer_{0}_{1}", currentQuestion.ID, currentQuarter.ID);
     
    }
    }如何动态生成文本框的ID。
    3.     Stopwatch theStopwatch = new Stopwatch();声明开始时间(单位:毫秒),
            theStopwatch.Start();开始计算时间(单位:毫秒),
         PageHelper.Alert("BindCustomerAttenderGridView:" + theStopwatch.ElapsedMilliseconds);弹出对应项目的执行时间,
     theStopwatch.Stop();停止计算时间(单位:毫秒),
    PageHelper.Alert(theStopwatch.ElapsedMilliseconds);弹出从开始到结束所用的时间(单位:毫秒)。
    4.动态创建DataTable:
     HtmlTableRow htrHeader = new HtmlTableRow();  声明一行第一行
     HtmlTableCell htcMainIndicatorCategory = new HtmlTableCell();声明第一行的第一格;
    htcMainIndicatorCategory.InnerText = "主分类"; 进行 TableCell 的赋值,
    htrHeader.Cells.Add(htcMainIndicatorCategory); 将这一行的这一格数据添加到DataTable中;
    HtmlTableCell htcSubIndicatorCategory = new HtmlTableCell();声明第一行的对应格的数据,
            htcSubIndicatorCategory.InnerText = "子分类";将第一行的对应格进行赋值,
    htrHeader.Cells.Add(htcSubIndicatorCategory);将对应数据插入对应格;
     foreach (SysUserLevel currentSysUserLevel in lstSysUserLevel) 通过循环获取对应Cell的所需要的值
            {
                HtmlTableCell htcemployees1 = new HtmlTableCell(); 声明一个Cell
                htcemployees1.InnerText = currentSysUserLevel.EnglishName; 将循环出来的值给到对应的Cell中
                htrHeader.Cells.Add(htcemployees1);将Cell的值赋给这一行。
            }
     this.tbIndicatorWeight.Rows.Add(htrHeader);将所有的Cell的值赋给行之后再绑定到DataTable中。
     

     

        Xing

  • 0 

    2015-07-18一天一记

    1.绑定CheckBoxList的时候要用BindControls来绑定对应的会员类型。

    2.在添加商户商品设置会员类型的时候,要先添加商户商品设置,并先获取商户商品设置的ID,在把商户商品设置的ID和会员类型添加到商户商品设置会员类型中。

    3.在修改商户商品设置会员类型的时候,要先删除之前的会员类型,在更新添加当前添加的会员类型。

        Xing

  • 0 

    2015-6-12一天一记

    1.用视图时要把JOIN改成LEFT;

    2.时间显示的修改: onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});

    3.明细页面下拉框:BindIDNameBasicTableWithEmptyItem;

    4.显示页面下拉框:BindIDNameBasicTableWithAllItem。

        Xing

发表新帖

本吧信息

吧主:

小吧主:共 0
吧务:共 0
目录:

企业会员 我要推广更多>>