Exemplo n.º 1
0
 string GetOnlyFieldName(ExcelUIViewListItem fd)
 {
     if (fd.DataBinding.IndexOf(".") >= 0)
         return fd.DataBinding.Substring(fd.DataBinding.IndexOf(".") + 1);
     else
         return fd.DataBinding;
 }
Exemplo n.º 2
0
 string GetOnlyTableName(ExcelUIViewListItem fd)
 {
     if (fd.DataBinding.IndexOf(".") >= 0)
         return fd.DataBinding.Substring(0, fd.DataBinding.IndexOf("."));
     else
         return "";
 }
Exemplo n.º 3
0
    string GetFormattingListString(ExcelUIViewList list, ExcelUIViewListItem item)
    {
        string str = "";
        if (item.DataBinding == null || item.DataBinding.IndexOf(".") < 0) return "";
        string tb = item.DataBinding.Substring(0, item.DataBinding.IndexOf("."));
        string fd = item.DataBinding.Substring(item.DataBinding.IndexOf(".") + 1);
        if (item.TextAlignment != null && item.TextAlignment.ToLower() == "right")
        {
            //viewCRMT_PMM_PROJECT_CONTRACT_List.DataColumns[""].PropertiesEdit.DisplayFormatString = "";
            //viewCRMT_PMM_PROJECT_CONTRACT_List.Columns[""].CellStyle.HorizontalAlign = HorizontalAlign.Center;
            str += "\t\tview" + list.ViewName + ".Columns[\"" + fd + "\"].CellStyle.HorizontalAlign = HorizontalAlign.Right;\r\n";
        }
        else if (item.TextAlignment != null && item.TextAlignment.ToLower() == "center")
        {
            str += "\t\tview" + list.ViewName + ".Columns[\"" + fd + "\"].CellStyle.HorizontalAlign = HorizontalAlign.Center;\r\n";
        }

        if (item.Formats != null && item.Formats != "")
        {
            str += "\t\tview" + list.ViewName + ".DataColumns[\"" + fd + "\"].PropertiesEdit.DisplayFormatString = \"" + item.Formats + "\";\r\n";
        }

        return str;
    }