1:在ImageIndexing.ImageInfoEntryEditView页面增加一个Checkbox类型的字段,绑定到AUDIT,因为AUDIT是个BOOL类型的字段,而且一直没有被使用,所以用它,其实应该在数据表里创建一个新字段SPECIAL_TYPE, 偷个懒先。
2:给这个字段的术语信息添加到术语表
exec dbo.spTERMINOLOGY_InsertOnly N'LBL_SPECIAL_TYPE' , N'en-US', N'ImageIndexing', null, null, N'Special Type:';
3:去数据库改spAP_INVOICES_Update存储过程
set QUOTED_IDENTIFIER ONGO -- 03/20/2009. baiyin. Created. -- 04/30/2009. baiyin. Add @POST parameter -- 07/16/2009. baiyin. Add @SHIP_TO_NUM_C,@LPL_NUM_C , @CUSTOMER_CODE parameters
for Tronitech2 Project. -- 07/16/2009. allen modify
for Tronitech2 Project. -- 07/23/2009. baiyin. Add @SERIAL_NUM parameter. -- 03/05/2010. baiyin. Add @DEPOSIT_DATE_C parameter. ALTER Procedure [dbo].[spAP_INVOICES_Update] ( @ID uniqueidentifier output , @MODIFIED_USER_ID uniqueidentifier , @ASSIGNED_USER_ID uniqueidentifier , @TEAM_ID uniqueidentifier , @INVOICE_NUM nvarchar(100) , @INVOICE_DATE datetime , @PO_NUM nvarchar(50) , @AP_VENDOR_ID uniqueidentifier , @SHIPPING money , @TAX money , @TOTAL money , @INVOICE_TYPE nvarchar(50) , @STATUS nvarchar(50) , @DESCRIPTION nvarchar(2000) , @POST bit -- 07/16/2009. baiyin. Add
for Tronitech2 project. , @SHIP_TO_NUM_C nvarchar(200) , @LPL_NUM_C nvarchar(200) , @CUSTOMER_CODE nvarchar(200) , @SERIAL_NUM_C nvarchar(400) , @DEPOSIT_DATE_C datetime , @AUDIT bit --03/06/2012 feng add @AUDIT
for special PODS with shipper# type )
asbegin
set nocount on -- Insert or Update AP_INVOICES table (Begin)
if not exists(select * from AP_INVOICES where ID = @ID) begin -- then
if dbo.fnIsEmptyGuid(@ID) = 1 begin -- then
set @ID = newid(); end --
if;
if @POST = 1 begin insert into AP_INVOICES ( ID , DELETED , CREATED_BY , DATE_ENTERED , MODIFIED_USER_ID , DATE_MODIFIED , INVOICE_NUM , INVOICE_DATE , PO_NUM , AP_VENDOR_ID , SHIPPING , TAX , TOTAL , INVOICE_TYPE , STATUS , POST , POST_COUNT , DATE_POST , DESCRIPTION , AUDIT ) values ( @ID , 0 , @MODIFIED_USER_ID , getdate() , @MODIFIED_USER_ID , getdate() , @INVOICE_NUM , @INVOICE_DATE , @PO_NUM , @AP_VENDOR_ID , @SHIPPING , @TAX , @TOTAL , @INVOICE_TYPE , @STATUS , 1 , 1 , getdate() , @DESCRIPTION , @AUDIT ); end
else begin insert into AP_INVOICES ( ID , DELETED , CREATED_BY , DATE_ENTERED , MODIFIED_USER_ID , DATE_MODIFIED , INVOICE_NUM , INVOICE_DATE , PO_NUM , AP_VENDOR_ID , SHIPPING , TAX , TOTAL , INVOICE_TYPE , STATUS , DESCRIPTION , AUDIT ) values ( @ID , 0 , @MODIFIED_USER_ID , getdate() , @MODIFIED_USER_ID , getdate() , @INVOICE_NUM , @INVOICE_DATE , @PO_NUM , @AP_VENDOR_ID , @SHIPPING , @TAX , @TOTAL , @INVOICE_TYPE , @STATUS , @DESCRIPTION , @AUDIT ); end end
else begin
if @POST = 1 begin update AP_INVOICES
set MODIFIED_USER_ID = @MODIFIED_USER_ID , DATE_MODIFIED = getdate() , ASSIGNED_USER_ID = @ASSIGNED_USER_ID , TEAM_ID = @TEAM_ID , INVOICE_NUM = @INVOICE_NUM , INVOICE_DATE = @INVOICE_DATE , PO_NUM = @PO_NUM , AP_VENDOR_ID = @AP_VENDOR_ID , SHIPPING = @SHIPPING , TAX = @TAX , TOTAL = @TOTAL , INVOICE_TYPE = @INVOICE_TYPE , STATUS = @STATUS , POST = 1 , POST_COUNT = ISNULL(POST_COUNT,0)+1 , DATE_POST = getdate() , DESCRIPTION = @DESCRIPTION , AUDIT = @AUDIT where ID = @ID ; end
else begin update AP_INVOICES
set MODIFIED_USER_ID = @MODIFIED_USER_ID , DATE_MODIFIED = getdate() , ASSIGNED_USER_ID = @ASSIGNED_USER_ID , TEAM_ID = @TEAM_ID , INVOICE_NUM = @INVOICE_NUM , INVOICE_DATE = @INVOICE_DATE , PO_NUM = @PO_NUM , AP_VENDOR_ID = @AP_VENDOR_ID , SHIPPING = @SHIPPING , TAX = @TAX , TOTAL = @TOTAL , INVOICE_TYPE = @INVOICE_TYPE , STATUS = @STATUS , DESCRIPTION = @DESCRIPTION , AUDIT = @AUDIT where ID = @ID ; end --
if end --
if; -- Insert or Update AP_INVOICES table (End) -- Insert or Update AP_INVOICES_CSTM table (Begin)
if not exists(select * from AP_INVOICES_CSTM where ID_C = @ID) begin -- then insert into AP_INVOICES_CSTM (ID_C, SHIP_TO_NUM_C, LPL_NUM_C, CUSTOMER_CODE_C, SERIAL_NUM_C, DEPOSIT_DATE_C) values ( @ID, @SHIP_TO_NUM_C, @LPL_NUM_C, @CUSTOMER_CODE, @SERIAL_NUM_C, @DEPOSIT_DATE_C); end
else begin update AP_INVOICES_CSTM
set SHIP_TO_NUM_C = @SHIP_TO_NUM_C, LPL_NUM_C = @LPL_NUM_C, CUSTOMER_CODE_C=@CUSTOMER_CODE, SERIAL_NUM_C=@SERIAL_NUM_C, DEPOSIT_DATE_C=@DEPOSIT_DATE_C where ID_C = @ID; end --
if; -- Insert or Update AP_INVOICES_CSTM table (End) end
4:到APSqlProcs.cs改spAP_INVOICE_Update方法:
修改AP_InvoiceHistory/EditView.ascx.cs
修改AP_ImageIndexing\InvoiceInfoEntry.ascx.cs:
修改AP_ImageIndexing\Pending\PendingInvoiceInfoEntry.ascx.cs:
修改AP_ImageIndexing\History\HistoryInvoiceInfoEntry.ascx.cs