PDA

View Full Version : [CLOSED] group summary does not support row editing?



tobros
Sep 26, 2013, 3:30 AM
I have a grid, in it i sum the data accoording some column, and I want to row editing, can not support?

Daniil
Sep 26, 2013, 5:21 AM
Hi @tobros,

Yes, editing is not available for a summary row.

A summary row's data count from a column's cells. How is it supposed to be edited?

For example, there are 1, 2, 3 values in the column's cells and, accordingly, 6 value in the summary cell. A user edits a summary row to, for example, 8. But there are still 1, 2, 3 in the cells.

tobros
Sep 26, 2013, 6:32 AM
Hi @tobros,

Yes, editing is not available for a summary row.

A summary row's data count from a column's cells. How is it supposed to be edited?

For example, there are 1, 2, 3 values in the column's cells and, accordingly, 6 value in the summary cell. A user edits a summary row to, for example, 8. But there are still 1, 2, 3 in the cells.

but I did not edit the summary column.


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="cashflow_data_adjust1.aspx.cs" Inherits="TobrosCWT.pages.cashflow.cashflow_data_adjust1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript">
var itemclick = function (record, item, index, e, eOpts) {
Ext.getCmp('drStartAccCode').originalText = Ext.String.trim(item.raw.Ccode);
Ext.getCmp('drStartAccCode').setValue(item.raw.Cod eName);
Ext.getCmp('drStartAccCode').collapse();


};

</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" SourceFormatting="True"></ext:ResourceManager>
<ext:Window runat="server" Title="现金流量_分配凭证过滤条件" ID="w_search_window" Hidden="True" Layout="HBoxLayout" Width="240">
<LayoutConfig>
<ext:HBoxLayoutConfig Pack="Center" />
</LayoutConfig>
<Items>

<ext:Container ID="Container1" runat="server" Layout="AnchorLayout" Margins="4">
<Defaults>
<ext:Parameter Name="LabelWidth" Value="60" Mode="Raw" />
</Defaults>
<Items>
<ext:ComboBox ID="cb_pzfw" runat="server" FieldLabel="凭证范围" Editable="False">
<Items>
<ext:ListItem Text="全部" Value="-1" />
<ext:ListItem Text="记账凭证" Value="1" />
<ext:ListItem Text="未记账凭证" Value="0" />
</Items>
<SelectedItems>
<ext:ListItem Text="全部" Value="-1" />
</SelectedItems>
</ext:ComboBox>
<ext:ComboBox ID="cb_vouch_class" runat="server" Editable="False" FieldLabel="凭证类别" DisplayField="VouchClassName" ValueField="VouchClassCode">
<Store>
<ext:Store runat="server" ID="store_VCC">
<Model>
<ext:Model ID="Model1" runat="server" IDProperty="VouchClassCode">
<Fields>
<ext:ModelField runat="server" Name="VouchClassCode"></ext:ModelField>
<ext:ModelField runat="server" Name="VouchClassName"></ext:ModelField>
</Fields>
</ext:Model>
</Model>

</ext:Store>
</Store>
<SelectedItems>
<ext:ListItem Index="0" />
</SelectedItems>

</ext:ComboBox>
<ext:ComboBox ID="cb_kjqj" FieldLabel="会计期间" Editable="False" runat="server">
</ext:ComboBox>

<ext:FieldContainer ID="FieldContainer1" runat="server" FieldLabel="凭证号">
<LayoutConfig>
<ext:HBoxLayoutConfig Pack="Center" />
</LayoutConfig>
<Items>
<ext:NumberField ID="pz_from" runat="server" Width="65" />
<ext:Label ID="Label2" runat="server" Text="-" />
<ext:NumberField ID="pz_to" runat="server" Width="65" />
</Items>
</ext:FieldContainer>

<ext:FieldContainer ID="fc_kmbm"
runat="server"
FieldLabel="科目编码(包含)"
AnchorHorizontal="100%"
LabelWidth="60"
Layout="HBoxLayout">
<Items>
<ext:DropDownField ID="drStartAccCode" runat="server" TriggerIcon="Search" Frame="true"
ForceFit="true">
<Listeners>
<Expand Handler="return this.picker.setWidth(250);" />
</Listeners>
<Component>
<ext:TreePanel
ID="TreePanel1"
runat="server"
Title="科目编码"
Icon="Accept"
Height="250"
Width="250"
UseArrows="true"
AutoScroll="true"
Animate="true"
HideHeaders="true"
RootVisible="false">
<Store>
<ext:TreeStore ID="TreeStore1" runat="Server" NodeParam="Ccode" AutoLoad="false">
<Model>
<ext:Model ID="Model5" runat="server" IDProperty="Ccode">
<Fields>
<ext:ModelField Name="Ccode"></ext:ModelField>

<ext:ModelField Name="CodeName"></ext:ModelField>
</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:AjaxProxy runat="Server" Json="true" Url="../../BasicInfoAshx/AllSubjectHandler.ashx">
<Reader>
<ext:JsonReader runat="Server" Root="data">
</ext:JsonReader>
</Reader>

</ext:AjaxProxy>
</Proxy>

</ext:TreeStore>
</Store>
<Root>
<ext:Node runat="Server" Expanded="true" Leaf="false">
</ext:Node>
</Root>
<ColumnModel>
<Columns>
<ext:TreeColumn ID="TreeColumn1" runat="server" Flex="1" DataIndex="CodeName" Text="科目">

</ext:TreeColumn>
</Columns>
</ColumnModel>
<Listeners>
<ItemClick Fn="itemclick"></ItemClick>
</Listeners>
</ext:TreePanel>
</Component>
</ext:DropDownField>


</Items>
</ext:FieldContainer>
</Items>
</ext:Container>

</Items>
<Buttons>
<ext:Button ID="Button1" runat="server" Text="确认">
<DirectEvents>
<Click OnEvent="btn_submit">
<EventMask ShowMask="True"></EventMask>
<ExtraParams>
<ext:Parameter Name="p_acc_code" Value="#{drStartAccCode}.originalText" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="Button2" runat="server" Text="取消"></ext:Button>
</Buttons>
</ext:Window>
<ext:GridPanel runat="server" Title="现金流量数据调整" ColumnLines="True">
<TopBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:Button ID="Button3" runat="server" Text="查询" Icon="BookOpen">
<Listeners>
<Click Handler="#{w_search_window}.show();"></Click>
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<Store>
<ext:Store runat="server" ID="s_store" OnReadData="on_read_data_xjllsjtz" PageSize="20" GroupField="Ddate">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="VouchId"></ext:ModelField>
<ext:ModelField Name="Ddate" Type="Date"></ext:ModelField>
<ext:ModelField Name="VouchClassCode"></ext:ModelField>
<ext:ModelField Name="VouchNo"></ext:ModelField>
<ext:ModelField Name="VouchClassCodeNo"></ext:ModelField>
<ext:ModelField Name="Digest"></ext:ModelField>
<ext:ModelField Name="Ccode"></ext:ModelField>
<ext:ModelField Name="Cname"></ext:ModelField>
<ext:ModelField Name="Jfje"></ext:ModelField>
<ext:ModelField Name="Dfje"></ext:ModelField>
<ext:ModelField Name="Bill"></ext:ModelField>
<ext:ModelField Name="Checker"></ext:ModelField>
<ext:ModelField Name="Book"></ext:ModelField>
<ext:ModelField Name="VouchSource"></ext:ModelField>

</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:PageProxy>
</ext:PageProxy>
</Proxy>
<Parameters>
<ext:StoreParameter Name="sp_pzfw" Value="#{cb_pzfw}.getValue()" Mode="Raw"/>
<ext:StoreParameter Name="sp_vouch_class_code" Value="#{cb_vouch_class}.getValue()" Mode="Raw"/>
<ext:StoreParameter Name="sp_kjqj" Value="#{cb_kjqj}.getValue()" Mode="Raw"/>
<ext:StoreParameter Name="pz_from" Value="#{pz_from}.getValue()" Mode="Raw"/>
<ext:StoreParameter Name="pz_to" Value="#{pz_to}.getValue()" Mode="Raw"/>
<ext:StoreParameter Name="drStartAccCode" Value="#{drStartAccCode}.getValue()" Mode="Raw"/>
</Parameters>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:DateColumn runat="server" DataIndex="Ddate" Text="日期" Format="yyyy-MM-dd"></ext:DateColumn>
<ext:Column runat="server" DataIndex="VouchClassCodeNo" Text="凭证字号"></ext:Column>
<ext:Column runat="server" DataIndex="Digest" Text="摘要" Flex="1"></ext:Column>
<ext:Column runat="server" DataIndex="Ccode" Text="科目编码"></ext:Column>
<ext:Column runat="server" DataIndex="Cname" Text="科目名称" Flex="1"></ext:Column>
<ext:SummaryColumn runat="server" DataIndex="Jfje" Text="借方金额" SummaryType="Sum">
</ext:SummaryColumn>
<ext:SummaryColumn runat="server" DataIndex="Dfje" Text="贷方金额" SummaryType="Sum"></ext:SummaryColumn>
<ext:Column runat="server" DataIndex="Bill" Text="制单"></ext:Column>
<ext:Column runat="server" DataIndex="Checker" Text="审核"></ext:Column>
<ext:Column runat="server" DataIndex="Book" Text="记账">
<Editor>
<ext:TextField runat="server"></ext:TextField>
</Editor>
</ext:Column>
<ext:Column runat="server" DataIndex="VouchSource" Text="凭证来源">
<Editor>
<ext:TextField runat="server"></ext:TextField>
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<BottomBar>
<ext:Toolbar runat="server">
<Items>
<ext:PagingToolbar runat="server" StoreID="s_store"></ext:PagingToolbar>
</Items>
</ext:Toolbar>
</BottomBar>
<Features>
<ext:GroupingSummary
ID="GroupingSummary1"
runat="server"
GroupHeaderTplString="日期:{name}"
HideGroupedHeader="False"
EnableGroupingMenu="false" />
</Features>
<Plugins>
<ext:RowEditing runat="server"></ext:RowEditing>
</Plugins>
</ext:GridPanel>
</form>
</body>
</html>


please check why


<ext:Column runat="server" DataIndex="Book" Text="记账">
<Editor>
<ext:TextField runat="server"></ext:TextField>
</Editor>
</ext:Column>
<ext:Column runat="server" DataIndex="VouchSource" Text="凭证来源">
<Editor>
<ext:TextField runat="server"></ext:TextField>
</Editor>
</ext:Column>

can not be edited when I double click a row which is not summary row.

Daniil
Sep 26, 2013, 1:32 PM
It edits for me.

I am testing with Ext.NET from the SVN trunk. What Ext.NET version are you testing with?

Could you, please, provide a screenshot highlighting a point where you double click? Maybe, I misunderstand something.

tobros
Sep 27, 2013, 1:05 AM
It edits for me.

I am testing with Ext.NET from the SVN trunk. What Ext.NET version are you testing with?

Could you, please, provide a screenshot highlighting a point where you double click? Maybe, I misunderstand something.

ext.net version:2.2.0.28491

I try again, I found that only the first row can be edited in one group, why?

see video
http://screencast.com/t/RNquwr1m

Daniil
Sep 27, 2013, 11:52 AM
ext.net version:2.2.0.28491

Unfortunately, it doesn't tell me exactly you are using the v2.2 release or some revision from the SVN trunk. Please specify it.



I try again, I found that only the first row can be edited in one group, why?

see video
http://screencast.com/t/RNquwr1m

Thank you for the video. So, I followed exactly those steps and cannot reproduce. Though, I tested with my own test case, not with your one because of I don't have the backend part.

tobros
Sep 29, 2013, 3:25 AM
Unfortunately, it doesn't tell me exactly you are using the v2.2 release or some revision from the SVN trunk. Please specify it.



Thank you for the video. So, I followed exactly those steps and cannot reproduce. Though, I tested with my own test case, not with your one because of I don't have the backend part.

I am using ext.net source from svn , the ext.net version 2.2.0.28491

my test case


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="cashflow_data_adjust1.aspx.cs" Inherits="TobrosCWT.pages.cashflow.cashflow_data_adjust1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="../../Script/GridPanelMergeCells.js"></script>
<script type="text/javascript">
var itemclick = function (record, item, index, e, eOpts) {
Ext.getCmp('drStartAccCode').originalText = Ext.String.trim(item.raw.Ccode);
Ext.getCmp('drStartAccCode').setValue(item.raw.Cod eName);
Ext.getCmp('drStartAccCode').collapse();


};

</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" SourceFormatting="True"></ext:ResourceManager>
<ext:Window runat="server" Title="现金流量_分配凭证过滤条件" ID="w_search_window" Hidden="True" Layout="HBoxLayout" Width="240">
<LayoutConfig>
<ext:HBoxLayoutConfig Pack="Center" />
</LayoutConfig>
<Items>

<ext:Container ID="Container1" runat="server" Layout="AnchorLayout" Margins="4">
<Defaults>
<ext:Parameter Name="LabelWidth" Value="60" Mode="Raw" />
</Defaults>
<Items>
<ext:ComboBox ID="cb_pzfw" runat="server" FieldLabel="凭证范围" Editable="False">
<Items>
<ext:ListItem Text="全部" Value="-1" />
<ext:ListItem Text="记账凭证" Value="1" />
<ext:ListItem Text="未记账凭证" Value="0" />
</Items>
<SelectedItems>
<ext:ListItem Text="全部" Value="-1" />
</SelectedItems>
</ext:ComboBox>
<ext:ComboBox ID="cb_vouch_class" runat="server" Editable="False" FieldLabel="凭证类别" DisplayField="VouchClassName" ValueField="VouchClassCode">
<Store>
<ext:Store runat="server" ID="store_VCC">
<Model>
<ext:Model ID="Model1" runat="server" IDProperty="VouchClassCode">
<Fields>
<ext:ModelField runat="server" Name="VouchClassCode"></ext:ModelField>
<ext:ModelField runat="server" Name="VouchClassName"></ext:ModelField>
</Fields>
</ext:Model>
</Model>

</ext:Store>
</Store>
<SelectedItems>
<ext:ListItem Index="0" />
</SelectedItems>

</ext:ComboBox>
<ext:ComboBox ID="cb_kjqj" FieldLabel="会计期间" Editable="False" runat="server">
</ext:ComboBox>

<ext:FieldContainer ID="FieldContainer1" runat="server" FieldLabel="凭证号">
<LayoutConfig>
<ext:HBoxLayoutConfig Pack="Center" />
</LayoutConfig>
<Items>
<ext:NumberField ID="pz_from" runat="server" Width="65" />
<ext:Label ID="Label2" runat="server" Text="-" />
<ext:NumberField ID="pz_to" runat="server" Width="65" />
</Items>
</ext:FieldContainer>

<ext:FieldContainer ID="fc_kmbm"
runat="server"
FieldLabel="科目编码(包含)"
AnchorHorizontal="100%"
LabelWidth="60"
Layout="HBoxLayout">
<Items>
<ext:DropDownField ID="drStartAccCode" runat="server" TriggerIcon="Search" Frame="true"
ForceFit="true">
<Listeners>
<Expand Handler="return this.picker.setWidth(250);" />
</Listeners>
<Component>
<ext:TreePanel
ID="TreePanel1"
runat="server"
Title="科目编码"
Icon="Accept"
Height="250"
Width="250"
UseArrows="true"
AutoScroll="true"
Animate="true"
HideHeaders="true"
RootVisible="false">
<Store>
<ext:TreeStore ID="TreeStore1" runat="Server" NodeParam="Ccode" AutoLoad="false">
<Model>
<ext:Model ID="Model5" runat="server" IDProperty="Ccode">
<Fields>
<ext:ModelField Name="Ccode"></ext:ModelField>

<ext:ModelField Name="CodeName"></ext:ModelField>
</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:AjaxProxy runat="Server" Json="true" Url="../../BasicInfoAshx/AllSubjectHandler.ashx">
<Reader>
<ext:JsonReader runat="Server" Root="data">
</ext:JsonReader>
</Reader>

</ext:AjaxProxy>
</Proxy>

</ext:TreeStore>
</Store>
<Root>
<ext:Node runat="Server" Expanded="true" Leaf="false">
</ext:Node>
</Root>
<ColumnModel>
<Columns>
<ext:TreeColumn ID="TreeColumn1" runat="server" Flex="1" DataIndex="CodeName" Text="科目">
</ext:TreeColumn>
</Columns>
</ColumnModel>
<Listeners>
<ItemClick Fn="itemclick"></ItemClick>
</Listeners>
</ext:TreePanel>
</Component>
</ext:DropDownField>


</Items>
</ext:FieldContainer>
</Items>
</ext:Container>

</Items>
<Buttons>
<ext:Button ID="Button1" runat="server" Text="确认">
<DirectEvents>
<Click OnEvent="btn_submit">
<EventMask ShowMask="True"></EventMask>
<ExtraParams>
<ext:Parameter Name="p_acc_code" Value="#{drStartAccCode}.originalText" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="Button2" runat="server" Text="取消"></ext:Button>
</Buttons>
</ext:Window>
<ext:GridPanel runat="server" Title="现金流量数据调整" ColumnLines="True" ID="gp1">
<TopBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:Button ID="Button3" runat="server" Text="查询" Icon="BookOpen">
<Listeners>
<Click Handler="#{w_search_window}.show();"></Click>
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<Store>
<ext:Store runat="server" ID="s_store" OnReadData="on_read_data_xjllsjtz" PageSize="20" GroupField="Ddate">
<Listeners>
</Listeners>
<Model>
<ext:Model runat="server" IDProperty="rn">
<Fields>
<ext:ModelField Name="rn"></ext:ModelField>
<ext:ModelField Name="VouchId"></ext:ModelField>
<ext:ModelField Name="Ddate" Type="Date"></ext:ModelField>
<ext:ModelField Name="VouchClassCode"></ext:ModelField>
<ext:ModelField Name="VouchNo"></ext:ModelField>
<ext:ModelField Name="VouchClassCodeNo"></ext:ModelField>
<ext:ModelField Name="Digest"></ext:ModelField>
<ext:ModelField Name="Ccode"></ext:ModelField>
<ext:ModelField Name="Cname"></ext:ModelField>
<ext:ModelField Name="Jfje"></ext:ModelField>
<ext:ModelField Name="Dfje"></ext:ModelField>
<ext:ModelField Name="Bill"></ext:ModelField>
<ext:ModelField Name="Checker"></ext:ModelField>
<ext:ModelField Name="Book"></ext:ModelField>
<ext:ModelField Name="VouchSource"></ext:ModelField>

</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:PageProxy>
</ext:PageProxy>
</Proxy>
<Parameters>
<ext:StoreParameter Name="sp_pzfw" Value="#{cb_pzfw}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="sp_vouch_class_code" Value="#{cb_vouch_class}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="sp_kjqj" Value="#{cb_kjqj}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="pz_from" Value="#{pz_from}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="pz_to" Value="#{pz_to}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="drStartAccCode" Value="#{drStartAccCode}.getValue()" Mode="Raw" />
</Parameters>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:DateColumn runat="server" DataIndex="Ddate" Text="日期" Format="yyyy-MM-dd"></ext:DateColumn>
<ext:Column runat="server" DataIndex="VouchClassCodeNo" Text="凭证字号"></ext:Column>
<ext:Column runat="server" DataIndex="Digest" Text="摘要" Flex="1"></ext:Column>
<ext:Column runat="server" DataIndex="Ccode" Text="科目编码"></ext:Column>
<ext:Column runat="server" DataIndex="Cname" Text="科目名称" Flex="1"></ext:Column>
<ext:SummaryColumn runat="server" DataIndex="Jfje" Text="借方金额" SummaryType="Sum">
</ext:SummaryColumn>
<ext:SummaryColumn runat="server" DataIndex="Dfje" Text="贷方金额" SummaryType="Sum"></ext:SummaryColumn>
<ext:Column runat="server" DataIndex="Bill" Text="制单"></ext:Column>
<ext:Column runat="server" DataIndex="Checker" Text="审核"></ext:Column>
<ext:Column runat="server" DataIndex="Book" Text="记账">
<Editor>
<ext:TextField runat="server"></ext:TextField>
</Editor>
</ext:Column>
<ext:Column runat="server" DataIndex="VouchSource" Text="凭证来源">
<Editor>
<ext:TextField runat="server"></ext:TextField>
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<BottomBar>
<ext:Toolbar runat="server">
<Items>
<ext:PagingToolbar runat="server" StoreID="s_store"></ext:PagingToolbar>
</Items>
</ext:Toolbar>
</BottomBar>
<Features>
<ext:GroupingSummary
ID="GroupingSummary1"
runat="server"
GroupHeaderTplString="日期:{name}"
HideGroupedHeader="False"
EnableGroupingMenu="false" />
</Features>
<SelectionModel>
<ext:CheckboxSelectionModel runat="server"></ext:CheckboxSelectionModel>
</SelectionModel>

</ext:GridPanel>
</form>
</body>
</html>





using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
using TobrosCWTAccess;
using TobrosDto;

namespace TobrosCWT.pages.cashflow
{
public partial class cashflow_data_adjust1 : System.Web.UI.Page
{
VouchClassService vouchClassService = new VouchClassService();
CashflowDataAdjustService cashflowDataAdjustService = new CashflowDataAdjustService();
KjrlbService kjrlbService = new KjrlbService();
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
//todo cb_vouch_class
store_VCC.DataSource = vouchClassService.VouchClasses();
store_VCC.DataBind();
InitKjQj();
}

}
private void InitKjQj()
{
List<string> ll = kjrlbService.GetKjqj();
foreach (var v in ll)
{
cb_kjqj.Items.Add(new Ext.Net.ListItem(v, v));
}
cb_kjqj.SelectedItems.Add(cb_kjqj.Items[0]);
}
protected void on_read_data_xjllsjtz(object sender, StoreReadDataEventArgs e)
{
int start = e.Start;
int limit = e.Limit;
int total = 0;
string sp_pzfw = e.Parameters["sp_pzfw"];
string vouch_class_code = e.Parameters["sp_vouch_class_code"];
string sp_kjqj = e.Parameters["sp_kjqj"];
string pz_from = e.Parameters["pz_from"];
string pz_to = e.Parameters["pz_to"];
string drStartAccCode = e.Parameters["drStartAccCode"].Trim();

// var ll = cashflowDataAdjustService.GetCashflowDataAdjust(st art, limit, out total, sp_pzfw, vouch_class_code, sp_kjqj, pz_from, pz_to, drStartAccCode);
// string lljson = JSON.Serialize(ll);
string lljson =
"[{\"VouchId\":10,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":1,\"VouchClassCodeNo\":\"银-0001\",\"Digest\":\"收到股东投入的现金股款 \",\"Ccode\":\"100201 \",\"Cname\":\"暑西办 \",\"Jfje\":12800000.0000,\"Dfje\":0.0000,\"Bill\":\"Manager\",\"Checker\":\"Manager\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":10,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":1,\"VouchClassCodeNo\":\"银-0001\",\"Digest\":\"收到股东投入的现金股款 \",\"Ccode\":\"310103 \",\"Cname\":\"社会公众股 \",\"Jfje\":0.0000,\"Dfje\":12000000.0000,\"Bill\":\"Manager\",\"Checker\":\"Manager\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":10,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":1,\"VouchClassCodeNo\":\"银-0001\",\"Digest\":\"收到股东投入的现金股款 \",\"Ccode\":\"311105 \",\"Cname\":\"社会公众股 \",\"Jfje\":0.0000,\"Dfje\":800000.0000,\"Bill\":\"Manager\",\"Checker\":\"Manager\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":11,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":2,\"VouchClassCodeNo\":\"银-0002\",\"Digest\":\"销售收入 \",\"Ccode\":\"510209 \",\"Cname\":\"氧气 \",\"Jfje\":0.0000,\"Dfje\":50000.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":11,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":2,\"VouchClassCodeNo\":\"银-0002\",\"Digest\":\"销售收入 \",\"Ccode\":\"100201 \",\"Cname\":\"暑西办 \",\"Jfje\":50000.0000,\"Dfje\":0.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":18,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":3,\"VouchClassCodeNo\":\"银-0003\",\"Digest\":\"销售收入 \",\"Ccode\":\"100203 \",\"Cname\":\"中行 \",\"Jfje\":30000000.0000,\"Dfje\":0.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":18,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":3,\"VouchClassCodeNo\":\"银-0003\",\"Digest\":\"销售收入 \",\"Ccode\":\"510101 \",\"Cname\":\"树脂 \",\"Jfje\":0.0000,\"Dfje\":20000000.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":18,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":3,\"VouchClassCodeNo\":\"银-0003\",\"Digest\":\"销售收入 \",\"Ccode\":\"510102 \",\"Cname\":\"隔膜液碱 \",\"Jfje\":0.0000,\"Dfje\":5000000.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":18,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":3,\"VouchClassCodeNo\":\"银-0003\",\"Digest\":\"销售收入 \",\"Ccode\":\"510104 \",\"Cname\":\"离子膜液碱 \",\"Jfje\":0.0000,\"Dfje\":5000000.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":15,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"现 \",\"VouchNo\":5,\"VouchClassCodeNo\":\"现-0005\",\"Digest\":\"支付工资 \",\"Ccode\":\"100101 \",\"Cname\":\"收 \",\"Jfje\":0.0000,\"Dfje\":2400000.0000,\"Bill\":\"Manager\",\"Checker\":\"Manager\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":15,\"Ddate\":\"2002-01-09T00:00:00\",\"VouchClassCode\":\"现 \",\"VouchNo\":5,\"VouchClassCodeNo\":\"现-0005\",\"Digest\":\"支付工资 \",\"Ccode\":\"215107 \",\"Cname\":\"工资 \",\"Jfje\":2400000.0000,\"Dfje\":0.0000,\"Bill\":\"Manager\",\"Checker\":\"Manager\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":22,\"Ddate\":\"2002-01-10T00:00:00\",\"VouchClassCode\":\"现 \",\"VouchNo\":5,\"VouchClassCodeNo\":\"现-0005\",\"Digest\":\"借款 \",\"Ccode\":\"113302 \",\"Cname\":\"个人 \",\"Jfje\":5000.0000,\"Dfje\":0.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":27,\"Ddate\":\"2002-01-10T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":5,\"VouchClassCodeNo\":\"银-0005\",\"Digest\":\"运费 \",\"Ccode\":\"55010105 \",\"Cname\":\"其它 \",\"Jfje\":256300.0000,\"Dfje\":0.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":22,\"Ddate\":\"2002-01-10T00:00:00\",\"VouchClassCode\":\"现 \",\"VouchNo\":5,\"VouchClassCodeNo\":\"现-0005\",\"Digest\":\"借款 \",\"Ccode\":\"100102 \",\"Cname\":\"付 \",\"Jfje\":0.0000,\"Dfje\":5000.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":27,\"Ddate\":\"2002-01-10T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":5,\"VouchClassCodeNo\":\"银-0005\",\"Digest\":\"增值税 \",\"Ccode\":\"2171010104 \",\"Cname\":\"材料 \",\"Jfje\":18300.0000,\"Dfje\":0.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":27,\"Ddate\":\"2002-01-10T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":5,\"VouchClassCodeNo\":\"银-0005\",\"Digest\":\"运费 \",\"Ccode\":\"100201 \",\"Cname\":\"暑西办 \",\"Jfje\":0.0000,\"Dfje\":100000.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":27,\"Ddate\":\"2002-01-10T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":5,\"VouchClassCodeNo\":\"银-0005\",\"Digest\":\"运费 \",\"Ccode\":\"100211 \",\"Cname\":\"农行南环分理处 \",\"Jfje\":0.0000,\"Dfje\":18600.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":27,\"Ddate\":\"2002-01-10T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":5,\"VouchClassCodeNo\":\"银-0005\",\"Digest\":\"运费 \",\"Ccode\":\"100210 \",\"Cname\":\"工行南环办 \",\"Jfje\":0.0000,\"Dfje\":156000.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":28,\"Ddate\":\"2002-01-10T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":6,\"VouchClassCodeNo\":\"银-0006\",\"Digest\":\"保温 \",\"Ccode\":\"130103 \",\"Cname\":\"其他 \",\"Jfje\":158620.0000,\"Dfje\":0.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"},{\"VouchId\":28,\"Ddate\":\"2002-01-10T00:00:00\",\"VouchClassCode\":\"银 \",\"VouchNo\":6,\"VouchClassCodeNo\":\"银-0006\",\"Digest\":\"支付费用 \",\"Ccode\":\"100209 \",\"Cname\":\"朝阳信贷部 \",\"Jfje\":0.0000,\"Dfje\":456230.0000,\"Bill\":\"Manager\",\"Checker\":\"魏永生\",\"Book\":\"魏永生\",\"VouchSource\":\"手工录入\"}]";
List<CashflowDataAdjust1> ll1 = JSON.Deserialize<List<CashflowDataAdjust1>>(lljson);
// var page = new Paging<CashflowDataAdjust1> (ll, total);
e.Total = total;
s_store.DataSource = ll1;

s_store.DataBind();
}
protected void btn_submit(object sender, DirectEventArgs e)
{
s_store.Reload();
//todo: 获取凭证范围,凭证类别,会计期间,凭证号,科目编码 0911
//凭证范围,记账1,未记账0,全部0
// var pzfw = cb_pzfw.SelectedItem.Value;
//凭证类别
// string pzlb = cb_vouch_class.SelectedItem.Value;
//会计期间
// string kjqj = cb_kjqj.SelectedItem.Value;
//凭证号
// string pz1 = pz_from.Text;
// string pz2 = pz_to.Text;
//科目编码
// var accCode1 = e.ExtraParams["p_acc_code"];

//todo: Cwzz_V_AccVouch 根据上述条件查询此表

// List<CashflowDataAdjust> ll = cashflowDataAdjustService.CashFlowDatas(pzfw, pzlb, kjqj, pz1, pz2, accCode1);

// gp_cash_flow_data_adjust.GetStore().DataSource = ll;
// gp_cash_flow_data_adjust.GetStore().DataBind();



}
}
}




using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TobrosDto
{
public class CashflowDataAdjust1
{
public int VouchId { get; set; }
public DateTime Ddate { get; set; }
public string VouchClassCode { get; set; }
public int VouchNo { get; set; }
public string VouchClassCodeNo { get; set; }
public string Digest { get; set; }
public string Ccode { get; set; }
public string Cname { get; set; }
public decimal Jfje { get; set; }
public decimal Dfje { get; set; }
public string Bill { get; set; }//制单
public string Checker { get; set; }//审核
public string Book { get; set; }//记账
public string VouchSource { get; set; }//凭证来源
}
}

Daniil
Sep 30, 2013, 5:03 AM
Thank you for a test case, but, unfortunately, I am getting "The type or namespace name could not be found" for: VouchClassService, CashflowDataAdjustService, KjrlbService.