123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679 |
- <?xml version="1.0" encoding="utf-8" ?>
- <Forms>
- <Form Name="FrmIndentBillOnNet">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @Title="网上订单";
- GetSchema();
- ChangeMode("Search");
- ]]>
- </Load>
- <Closing>
- ;
- </Closing>
- <Closed>
- ;
- </Closed>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search" />
- </Search>
- <View>
- <Lable name="View" />
- </View>
- <Modify>
- <Lable name="Modify" />
- </Modify>
- </Mode>
- <Controls>
- <IKDateTimePicker name="dtpDate" DataSource="IndentBillOnNet.Date_IndentBillOnNet"></IKDateTimePicker>
- <IKTextButton name="tbNo" DataSource="IndentBillOnNet.No_IndentBillOnNet">
- <Events>
- <Enter>
- <![CDATA[
- if(tbNo.ReadOnly == false)
- {
- if(tbNo.CValue != StringEmpty())
- {
- if(Search("SearchIndentBillOnNetWithNo", tbNo.CValue))
- {
- if(GetRight("客户基本资料","全权查看")||Equals(GetLoginUserID(),#IndentBillOnNet.CustomerCreator))
- ChangeMode("View");
- else
- {
- @EnterNo=tbNo.CValue;
- ChangeMode("Search");
- tbNo.CValue=@EnterNo;
- MessageBox("你没有查看该单据资料的权限!",@Title);
- return;
- }
- }
- else
- {
-
- MessageBox("该网上订单不存在!",@Title);
- }
- }
- else
- {
- MessageBox("请输入网上订单号!",@Title);
- }
- }
- ]]>
- </Enter>
- <Click>
- ShowSearchBox("BillSearch","NODEPOT", "tbNo",tbNo.CValue);
- </Click>
- </Events>
- </IKTextButton>
- <IKButton name="btnDelete">
- <Events>
- <Click>
- BeginUnAudit();
- #IndentBillOnNet.ID_Assessor = DBNull();
- #IndentBillOnNet.Name_Assessor = "";
- #IndentBillOnNet.Disable_IndentBillOnNet = true;
- #IndentBillOnNet.DeleteUser_IndentBillOnNet = GetLoginUserID();
- #IndentBillOnNet.DeleteUserName = GetCurrentUser();
- #IndentBillOnNet.DeleteDate_IndentBillOnNet = DateTimeNow();
- UnAudit();
- ChangeMode("View");
- EndUnAudit();
- </Click>
- </Events>
- </IKButton>
- <IKTextButton name="tbCustomerNo" DataSource="IndentBillOnNet.No_Customer"></IKTextButton>
- <IKTextBox name="txtCustomerShortName" DataSource="IndentBillOnNet.ShortName_Customer"></IKTextBox>
- <IKTextBox name="txtComment" DataSource="IndentBillOnNet.Comment_IndentBillOnNet"></IKTextBox>
- <IKTextBox name="txtAudi" DataSource="IndentBillOnNet.Name_Assessor"></IKTextBox>
- <IKDateTimeText name="dtAssessDate" DataSource="IndentBillOnNet.AssessDate_IndentBillOnNet"></IKDateTimeText>
- <IKTextBox name="cbLinkman" DataSource="IndentBillOnNet.Name_Linkman" ></IKTextBox>
- <IKTextBox name="cbTele" DataSource="IndentBillOnNet.Tel_IndentBillOnNet" ></IKTextBox>
- <IKTextBox name="cbFax" DataSource="IndentBillOnNet.Fax_IndentBillOnNet" ></IKTextBox>
- <IKTextBox name="txtPostalcode" DataSource="IndentBillOnNet.Postcode_IndentBillOnNet"></IKTextBox>
- <IKTextBox name="txtSendAddr" DataSource="IndentBillOnNet.SendAddr_IndentBillOnNet"></IKTextBox>
- <IKTextBox name="cbInvoiceTitle" DataSource="IndentBillOnNet.InvoiceTitle_Company"></IKTextBox>
- <IKTextBox name="txtAdress" DataSource="IndentBillOnNet.InvoiceAddress_Company"></IKTextBox>
- <IKNumericTextBox name="ntbTaxSum" DataSource="IndentBillOnNet.TaxAmount_IndentBillOnNet"></IKNumericTextBox>
- <IKNumericTextBox name="ntbMoneySum" DataSource="IndentBillOnNet.GoodsAmount_IndentBillOnNet"></IKNumericTextBox>
- <IKNumericTextBox name="ntbSum" DataSource="IndentBillOnNet.Amount_IndentBillOnNet"></IKNumericTextBox>
- <!--以下新增-->
- <IKTextBox name="cbIndentor" DataSource="IndentBillOnNet.Name_CustomerAccount"></IKTextBox>
- <IKTextBox name="txtLastModUser" DataSource="IndentBillOnNet.LastModUserName"></IKTextBox>
- <IKDateTimeText name="dtLastModDate" DataSource="IndentBillOnNet.LastModDate_IndentBillOnNet"></IKDateTimeText>
- <IKTextBox name="txtDeleteUser" DataSource="IndentBillOnNet.DeleteUserName"></IKTextBox>
- <IKDateTimeText name="dtDeleteDate" DataSource="IndentBillOnNet.DeleteDate_IndentBillOnNet"></IKDateTimeText>
- <IKTextBox name="txtBillComment" DataSource="IndentBillOnNet.FeedbackComment_IndentBillOnNet"></IKTextBox>
- <!--结束-->
- <IKDataGridEx name="dgProduct" DataSource="IndentBillOnNetProduct" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="IndentBillOnNetProduct.No_IndentBillOnNetProduct" />
- <DataColumn Index="1" DataSource="IndentBillOnNetProduct.No_Product" />
- <DataColumn Index="2" DataSource="IndentBillOnNetProduct.Name_Product" />
- <DataColumn Index="3" DataSource="IndentBillOnNetProduct.Quantity_IndentBillOnNetProduct" />
- <DataColumn Index="4" DataSource="IndentBillOnNetProduct.Unit_Product" />
- <DataColumn Index="5" DataSource="IndentBillOnNetProduct.UnitPrice_IndentBillOnNetProduct"/>
- <DataColumn Index="6" DataSource="IndentBillOnNetProduct.Amount_IndentBillOnNetProduct" />
- <DataColumn Index="7" DataSource="IndentBillOnNetProduct.AvailableQty_ProductStocks" />
- <DataColumn Index="8" DataSource="IndentBillOnNetProduct.Comment_IndentBillOnNetProduct" />
- </IKDataGridEx>
- <IKButton name="btnDelelte">
- <Events>
- <Click>
- BeginUnAudit();
- #IndentBillOnNet.Disable_IndentBillOnNet=true;
- #IndentBillOnNet.DeleteUser_IndentBillOnNet = GetLoginUserID();
- #IndentBillOnNet.DeleteUserName = GetCurrentUser();
- #IndentBillOnNet.DeleteDate_IndentBillOnNet = DateTimeNow();
- UnAudit();
- ChangeMode("View");
- EndUnAudit();
- </Click>
- </Events>
- </IKButton>
- <IKFormToolBar name="toolBar">
- <Events>
- <ClickFirst>
- if (Search("SearchIndentBillOnNetFirst",GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
- {
- ChangeMode("View");
- }
- </ClickFirst>
- <ClickPrev>
- if (Search("SearchIndentBillOnNetPrevious", tbNo.CValue,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
- {
- ChangeMode("View");
- }
- </ClickPrev>
- <ClickNext>
- if (Search("SearchIndentBillOnNetNext", tbNo.CValue,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
- {
- ChangeMode("View");
- }
- </ClickNext>
- <ClickLast>
- if (Search("SearchIndentBillOnNetLast",GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
- {
- ChangeMode("View");
- }
- </ClickLast>
- <ClickEmpty>
- ChangeMode("Search");
- </ClickEmpty>
- <ClickPrint>
- ShowPrintBox("BillSearch",#IndentBillOnNet.No_IndentBillOnNet,#IndentBillOnNet.No_IndentBillOnNet);
- </ClickPrint>
- <ClickAudit>
- <Lable name = "AuditLable"/>
- </ClickAudit>
- <ClickUnAudit>
- BeginUnAudit();
- UnAudit();
- ChangeMode("View");
- EndUnAudit();
- </ClickUnAudit>
- <ClickImport>
- ;
- </ClickImport>
- <ClickExport>
- ;
- </ClickExport>
- <ClickClose>
- ;
- </ClickClose>
- <ClickExpand>
- </ClickExpand>
- <ClickExportItem>
- <![CDATA[
- if (toolBar.MenuItemText == "销货单")
- {
- ExportBillProductStart("#SaleBillProduct.Type_FromBill",25,"#SaleBillProduct.Name_BillType","网上订单","#SaleBillProduct.No_FromBill",#IndentBillOnNet.No_IndentBillOnNet,"#SaleBill.No_Customer",#IndentBillOnNet.No_Customer,"#SaleBill.TaxCurrency_SaleBill",#IndentBillOnNet.TaxCurrency_IndentBillOnNet);
- ExportBillProduct("dgProduct","#IndentBillOnNetProduct","#SaleBillProduct.No_FromBillProduct","#IndentBillOnNetProduct.No_IndentBillOnNetProduct","#SaleBillProduct.No_Product","#IndentBillOnNetProduct.No_Product","#SaleBillProduct.Quantity_SaleBillProduct","#IndentBillOnNetProduct.Quantity_IndentBillOnNetProduct");
- }
- if (toolBar.MenuItemText == "订货单")
- {
- ExportBillProductStart("#IndentBill.No_Customer",#IndentBillOnNet.No_Customer);
- ExportBillProduct("dgProduct","#IndentBillOnNetProduct","#IndentBillProduct.No_Product","#IndentBillOnNetProduct.No_Product","#IndentBillProduct.Quantity_IndentBillProduct","#IndentBillOnNetProduct.Quantity_IndentBillOnNetProduct","#IndentBillProduct.Comment_IndentBillProduct","#IndentBillOnNetProduct.Comment_IndentBillOnNetProduct");
- }
- ]]>
- </ClickExportItem>
- <ClickModify>
- ChangeMode("Modify");
- </ClickModify>
- <ClickSubmit>
- <Lable name="SubmitButtonClick" />
- </ClickSubmit>
- </Events>
- </IKFormToolBar>
- </Controls>
-
- <LockInfomation LockID="ID_IndentBillOnNet" LockNO="No_IndentBillOnNet" LockSearchFunction="SearchIndentBillOnNetWithNo" LockAudit="ID_Assessor"/>
- <LogInfomation LogNO="#IndentBillOnNet.No_IndentBillOnNet" RecordFormField="" RecordDataGridField="#IndentBillOnNetProduct.No_Product,#IndentBillOnNetProduct.Quantity_IndentBillOnNetProduct,#IndentBillOnNetProduct.Amount_IndentBillOnNetProduct"/>
- <ChildForms>
- <ChildForm name="BillSearch" DataSource="IndentBillOnNet" SearchFunction="SearchAllBill" SearchFunctionCondition="SearchBillCondition" SearchFunctionByNo="SearchIndentBillOnNetWithNo">
- <DataColumn Index="0" MappingName="#IndentBillOnNet.No_IndentBillOnNet" HeaderText="网上订单号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#IndentBillOnNet.Date_IndentBillOnNet" HeaderText="制单日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="2" MappingName="#IndentBillOnNet.No_Customer" HeaderText="客户编号" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="3" MappingName="#IndentBillOnNet.ShortName_Customer" HeaderText="客户名称" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="4" MappingName="#IndentBillOnNet.TaxCurrency_IndentBillOnNet" HeaderText="税别" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="5" MappingName="#IndentBillOnNet.Name_Linkman" HeaderText="联系人" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="6" MappingName="#IndentBillOnNet.Tel_IndentBillOnNet" HeaderText="电话" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="7" MappingName="#IndentBillOnNet.Fax_IndentBillOnNet" HeaderText="传真" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- </ChildForms>
- <FormatString>
- <Format name="SearchCustomerCondition">
- if(GetRight("客户基本资料","全权查看"))
- {
- FormatString("");
- }
- else
- {
- FormatString(" Customer.ID_Creator='{0}' ",GetLoginUserID());
- }
- </Format>
- <Format name="SearchBillCondition">
- if(GetRight("客户基本资料","全权查看"))
- {
- FormatString("");
- }
- else
- {
- FormatString(" Disable_IndentBillOnNet = 0 and Customer.ID_Creator='{0}' ",GetLoginUserID());
- }
- </Format>
- </FormatString>
- </Client>
-
- <Server>
- <Tables>
- <Table name="IndentBillOnNet" Type="Parent">
- <GetSchema CmdType="Text" CmdText=" SELECT Top 0 IndentBillOnNet.*
- ,Customer.No_Customer
- ,Customer.Name_Customer
- ,Customer.ShortName_Customer
- ,Customer.Type_Customer
- ,Customer.LastDiscount_Customer
- ,Customer.PostalCode_Customer
- ,ISNULL(b.Name_User, '') AS Name_Assessor
- ,Customer.ID_Creator As CustomerCreator
- ,c.Name_User AS LastModUserName
- ,d.Name_User AS DeleteUserName
- FROM IndentBillOnNet
- LEFT JOIN Customer ON Customer.ID_Customer = IndentBillOnNet.ID_Customer
- LEFT JOIN AppUser b ON b.ID_User = IndentBillOnNet.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User = IndentBillOnNet.LastModUser_IndentBillOnNet
- LEFT JOIN AppUser d ON d.ID_User = IndentBillOnNet.DeleteUser_IndentBillOnNet
- " />
- <Update CmdType="Text" CmdText="Update IndentBillOnNet Set FeedbackComment_IndentBillOnNet = @FeedbackComment_IndentBillOnNet
- ,LastModUser_IndentBillOnNet = @LastModUser_IndentBillOnNet
- ,LastModDate_IndentBillOnNet = @LastModDate_IndentBillOnNet
- Where ID_IndentBillOnNet = @ID_IndentBillOnNet
- ">
- <Params>
- <Param name="@ID_IndentBillOnNet" type="IndentBillOnNet.ID_IndentBillOnNet" sourceColumn="ID_IndentBillOnNet" />
- <Param name="@FeedbackComment_IndentBillOnNet" type="IndentBillOnNet.FeedbackComment_IndentBillOnNet" sourceColumn="FeedbackComment_IndentBillOnNet" />
- <Param name="@LastModUser_IndentBillOnNet" type="IndentBillOnNet.LastModUser_IndentBillOnNet" sourceColumn="LastModUser_IndentBillOnNet" />
- <Param name="@LastModDate_IndentBillOnNet" type="IndentBillOnNet.LastModDate_IndentBillOnNet" sourceColumn="LastModDate_IndentBillOnNet" />
- </Params>
- </Update>
- <Audit CmdType="Text" CmdText=" UPDATE IndentBillOnNet SET ID_Assessor = @ID_Assessor
- ,AssessDate_IndentBillOnNet = @AssessDate_IndentBillOnNet
- ,Disable_IndentBillOnNet=@Disable_IndentBillOnNet
- ,DeleteUser_IndentBillOnNet = @DeleteUser_IndentBillOnNet
- ,DeleteDate_IndentBillOnNet = @DeleteDate_IndentBillOnNet
- WHERE ID_IndentBillOnNet = @ID_IndentBillOnNet
- ">
- <Params>
- <Param name="@ID_IndentBillOnNet" type="IndentBillOnNet.ID_IndentBillOnNet" sourceColumn="ID_IndentBillOnNet" />
- <Param name="@ID_Assessor" type="IndentBillOnNet.ID_Assessor" sourceColumn="ID_Assessor" />
- <Param name="@AssessDate_IndentBillOnNet" type="IndentBillOnNet.AssessDate_IndentBillOnNet" sourceColumn="AssessDate_IndentBillOnNet" />
- <Param name="@Disable_IndentBillOnNet" type="IndentBillOnNet.Disable_IndentBillOnNet" sourceColumn="Disable_IndentBillOnNet" />
- <Param name="@DeleteUser_IndentBillOnNet" type="IndentBillOnNet.DeleteUser_IndentBillOnNet" sourceColumn="DeleteUser_IndentBillOnNet" />
- <Param name="@DeleteDate_IndentBillOnNet" type="IndentBillOnNet.DeleteDate_IndentBillOnNet" sourceColumn="DeleteDate_IndentBillOnNet" />
- </Params>
- </Audit>
- <FKErrorReport ErrorMessage="该单据已被其他单据引用,删除失败!" />
- <UNIQUEErrorReport ErrorMessage="该网上订单号已存在,提交失败!" />
- </Table>
- <Table name="IndentBillOnNetProduct" Type="Child">
- <GetSchema CmdType="Text" CmdText=" SELECT Top 0 IndentBillOnNetProduct.*
- ,Product.No_Product
- ,Product.Name_Product
- ,Product.Unit_Product,AvailableQty_ProductStocks
- ,(IndentBillOnNetProduct.Quantity_IndentBillOnNetProduct * IndentBillOnNetProduct.UnitPrice_IndentBillOnNetProduct) AS Amount_IndentBillOnNetProduct
- ,Price_Product
- FROM IndentBillOnNetProduct
- LEFT JOIN Product ON Product.ID_Product = IndentBillOnNetProduct.ID_Product
- " />
-
- <Update CmdType="Text" CmdText=" Update IndentBillOnNetProduct Set Comment_IndentBillOnNetProduct = @Comment_IndentBillOnNetProduct
- Where ID_IndentBillOnNetProduct = @ID_IndentBillOnNetProduct
- ">
- <Params>
- <Param name="@ID_IndentBillOnNetProduct" type="IndentBillOnNetProduct.ID_IndentBillOnNetProduct" sourceColumn="ID_IndentBillOnNetProduct" />
- <Param name="@Comment_IndentBillOnNetProduct" type="IndentBillOnNetProduct.Comment_IndentBillOnNetProduct" sourceColumn="Comment_IndentBillOnNetProduct" />
- </Params>
- </Update>
- </Table>
- </Tables>
- <Search>
- <SearchAllBill CmdType="Text" CmdText=" SELECT IndentBillOnNet.*
- ,Customer.No_Customer
- ,Customer.Name_Customer
- ,Customer.ShortName_Customer
- ,Customer.Type_Customer
- ,Customer.LastDiscount_Customer
- ,Customer.PostalCode_Customer
- ,ISNULL(b.Name_User, '') AS Name_Assessor
- ,Customer.ID_Creator As CustomerCreator
- FROM IndentBillOnNet
- LEFT JOIN Customer ON Customer.ID_Customer = IndentBillOnNet.ID_Customer
- LEFT JOIN AppUser b ON b.ID_User = IndentBillOnNet.ID_Assessor
- ">
- <Tables>
- <Table name="AllBill" />
- </Tables>
- </SearchAllBill>
- <SearchIndentBillOnNetWithNo CmdType="Text" CmdText=" DECLARE @ID_IndentBillOnNet uniqueidentifier
- SELECT IndentBillOnNet.*
- ,Customer.No_Customer
- ,Customer.Name_Customer
- ,Customer.ShortName_Customer
- ,Customer.Type_Customer
- ,Customer.LastDiscount_Customer
- ,Customer.PostalCode_Customer
- ,ISNULL(b.Name_User, '') AS Name_Assessor
- ,Customer.ID_Creator As CustomerCreator
- ,c.Name_User AS LastModUserName
- ,d.Name_User AS DeleteUserName
- FROM IndentBillOnNet
- LEFT JOIN Customer ON Customer.ID_Customer = IndentBillOnNet.ID_Customer
- LEFT JOIN AppUser b ON b.ID_User = IndentBillOnNet.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User = IndentBillOnNet.LastModUser_IndentBillOnNet
- LEFT JOIN AppUser d ON d.ID_User = IndentBillOnNet.DeleteUser_IndentBillOnNet
- WHERE IndentBillOnNet.No_IndentBillOnNet = @No_IndentBillOnNet
-
- SELECT @ID_IndentBillOnNet = IndentBillOnNet.ID_IndentBillOnNet
- FROM IndentBillOnNet
- WHERE IndentBillOnNet.No_IndentBillOnNet = @No_IndentBillOnNet
-
- SELECT [ID_IndentBillOnNetProduct]
- ,[No_IndentBillOnNetProduct]
- ,IndentBillOnNetProduct.[ID_IndentBillOnNet]
- ,IndentBillOnNetProduct.[ID_Product]
- ,[Quantity_IndentBillOnNetProduct]
- ,[UnitPrice_IndentBillOnNetProduct]
- ,IndentBillOnNet.No_IndentBillOnNet as [Comment_IndentBillOnNetProduct]
- ,[Amount_SaleBill]
- ,Product.No_Product
- ,Product.Name_Product
- ,Product.Unit_Product
- ,A.AvailableQty_ProductStocks
- ,(IndentBillOnNetProduct.Quantity_IndentBillOnNetProduct * IndentBillOnNetProduct.UnitPrice_IndentBillOnNetProduct) AS Amount_IndentBillOnNetProduct
- ,Price_Product
- FROM IndentBillOnNetProduct
- LEFT JOIN IndentBillOnNet on IndentBillOnNet.ID_IndentBillOnNet = IndentBillOnNetProduct.ID_IndentBillOnNet
- LEFT JOIN Product ON Product.ID_Product = IndentBillOnNetProduct.ID_Product
- Left join (Select ID_Product,Sum(AvailableQty_ProductStocks) As AvailableQty_ProductStocks From ProductStocks
- Group By ID_Product) A On A.ID_Product = Product.ID_Product
- WHERE IndentBillOnNetProduct.ID_IndentBillOnNet = @ID_IndentBillOnNet
- ORDER BY CAST(IndentBillOnNetProduct.No_IndentBillOnNetProduct AS INT)
- ">
- <Params>
- <Param name="@No_IndentBillOnNet" type="IndentBillOnNet.No_IndentBillOnNet" Index="0" />
- </Params>
- <Tables>
- <Table name="IndentBillOnNet" />
- <Table name="IndentBillOnNetProduct" />
- </Tables>
- </SearchIndentBillOnNetWithNo>
- <SearchIndentBillOnNetFirst CmdType="Text" CmdText=" DECLARE @ID_IndentBillOnNet uniqueidentifier
- DECLARE @IndentBillOnNetNo nvarchar(64)
- SELECT TOP 1 @IndentBillOnNetNo = IndentBillOnNet.No_IndentBillOnNet FROM IndentBillOnNet
- Join Customer On Customer.ID_Customer=IndentBillOnNet.ID_Customer
- WHERE Customer.ID_Creator=case IsNull(DataLength(@Right),0) When 0 Then Customer.ID_Creator Else @Right End --added for validating right
- ORDER BY IndentBillOnNet.No_IndentBillOnNet
- SELECT IndentBillOnNet.*, Customer.No_Customer, Customer.Name_Customer, Customer.ShortName_Customer, Customer.Type_Customer,
- Customer.LastDiscount_Customer, Customer.PostalCode_Customer, ISNULL(b.Name_User, '') AS Name_Assessor, Customer.ID_Creator As CustomerCreator ,
- c.Name_User AS LastModUserName,d.Name_User AS DeleteUserName
- FROM IndentBillOnNet
- LEFT JOIN Customer ON Customer.ID_Customer = IndentBillOnNet.ID_Customer
- LEFT JOIN AppUser b ON b.ID_User = IndentBillOnNet.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User = IndentBillOnNet.LastModUser_IndentBillOnNet
- LEFT JOIN AppUser d ON d.ID_User = IndentBillOnNet.DeleteUser_IndentBillOnNet
- WHERE IndentBillOnNet.No_IndentBillOnNet = @IndentBillOnNetNo
- SELECT @ID_IndentBillOnNet = IndentBillOnNet.ID_IndentBillOnNet FROM IndentBillOnNet WHERE IndentBillOnNet.No_IndentBillOnNet = @IndentBillOnNetNo
-
- SELECT [ID_IndentBillOnNetProduct]
- ,[No_IndentBillOnNetProduct]
- ,IndentBillOnNetProduct.[ID_IndentBillOnNet]
- ,IndentBillOnNetProduct.[ID_Product]
- ,[Quantity_IndentBillOnNetProduct]
- ,[UnitPrice_IndentBillOnNetProduct]
- ,IndentBillOnNet.No_IndentBillOnNet as [Comment_IndentBillOnNetProduct]
- ,[Amount_SaleBill],
- Product.No_Product, Product.Name_Product, Product.Unit_Product, A.AvailableQty_ProductStocks,
- (IndentBillOnNetProduct.Quantity_IndentBillOnNetProduct * IndentBillOnNetProduct.UnitPrice_IndentBillOnNetProduct) AS Amount_IndentBillOnNetProduct ,Price_Product
- FROM IndentBillOnNetProduct
- LEFT JOIN IndentBillOnNet on IndentBillOnNet.ID_IndentBillOnNet = IndentBillOnNetProduct.ID_IndentBillOnNet
- LEFT JOIN Product ON Product.ID_Product = IndentBillOnNetProduct.ID_Product
- Left join (Select ID_Product,Sum(AvailableQty_ProductStocks) As AvailableQty_ProductStocks From ProductStocks
- Group By ID_Product) A On A.ID_Product = Product.ID_Product
- WHERE IndentBillOnNetProduct.ID_IndentBillOnNet = @ID_IndentBillOnNet ORDER BY CAST(IndentBillOnNetProduct.No_IndentBillOnNetProduct AS INT)">
- <Params>
- <Param name="@Right" type="IndentBillOnNet.ID_Customer" Index="0" />
- </Params>
- <Tables>
- <Table name="IndentBillOnNet" />
- <Table name="IndentBillOnNetProduct" />
- </Tables>
- </SearchIndentBillOnNetFirst>
- <SearchIndentBillOnNetPrevious CmdType="Text" CmdText=" DECLARE @ID_IndentBillOnNet uniqueidentifier
- DECLARE @IndentBillOnNetNo nvarchar(64)
- SELECT TOP 1 @IndentBillOnNetNo = IndentBillOnNet.No_IndentBillOnNet FROM IndentBillOnNet
- Join Customer On Customer.ID_Customer=IndentBillOnNet.ID_Customer
- WHERE IndentBillOnNet.No_IndentBillOnNet < @No_IndentBillOnNet
- And Customer.ID_Creator=case IsNull(DataLength(@Right),0) When 0 Then Customer.ID_Creator Else @Right End --added for validating right
- ORDER BY IndentBillOnNet.No_IndentBillOnNet desc
- SELECT IndentBillOnNet.*, Customer.No_Customer, Customer.Name_Customer, Customer.ShortName_Customer, Customer.Type_Customer,
- Customer.LastDiscount_Customer, Customer.PostalCode_Customer, ISNULL(b.Name_User, '') AS Name_Assessor, Customer.ID_Creator As CustomerCreator ,
- c.Name_User AS LastModUserName,d.Name_User AS DeleteUserName
- FROM IndentBillOnNet
- LEFT JOIN Customer ON Customer.ID_Customer = IndentBillOnNet.ID_Customer
- LEFT JOIN AppUser b ON b.ID_User = IndentBillOnNet.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User = IndentBillOnNet.LastModUser_IndentBillOnNet
- LEFT JOIN AppUser d ON d.ID_User = IndentBillOnNet.DeleteUser_IndentBillOnNet
- WHERE IndentBillOnNet.No_IndentBillOnNet = @IndentBillOnNetNo
- SELECT @ID_IndentBillOnNet = IndentBillOnNet.ID_IndentBillOnNet FROM IndentBillOnNet WHERE IndentBillOnNet.No_IndentBillOnNet = @IndentBillOnNetNo
-
- SELECT [ID_IndentBillOnNetProduct]
- ,[No_IndentBillOnNetProduct]
- ,IndentBillOnNetProduct.[ID_IndentBillOnNet]
- ,IndentBillOnNetProduct.[ID_Product]
- ,[Quantity_IndentBillOnNetProduct]
- ,[UnitPrice_IndentBillOnNetProduct]
- ,IndentBillOnNet.No_IndentBillOnNet as [Comment_IndentBillOnNetProduct]
- ,[Amount_SaleBill]
- , Product.No_Product, Product.Name_Product, Product.Unit_Product, A.AvailableQty_ProductStocks,
- (IndentBillOnNetProduct.Quantity_IndentBillOnNetProduct * IndentBillOnNetProduct.UnitPrice_IndentBillOnNetProduct) AS Amount_IndentBillOnNetProduct ,Price_Product
- FROM IndentBillOnNetProduct
- LEFT JOIN IndentBillOnNet on IndentBillOnNet.ID_IndentBillOnNet = IndentBillOnNetProduct.ID_IndentBillOnNet
- LEFT JOIN Product ON Product.ID_Product = IndentBillOnNetProduct.ID_Product
- Left join (Select ID_Product,Sum(AvailableQty_ProductStocks) As AvailableQty_ProductStocks From ProductStocks
- Group By ID_Product) A On A.ID_Product = Product.ID_Product
- WHERE IndentBillOnNetProduct.ID_IndentBillOnNet = @ID_IndentBillOnNet ORDER BY CAST(IndentBillOnNetProduct.No_IndentBillOnNetProduct AS INT)">
- <Params>
- <Param name="@No_IndentBillOnNet" type="IndentBillOnNet.No_IndentBillOnNet" Index="0" />
- <Param name="@Right" type="IndentBillOnNet.ID_Customer" Index="1" />
- </Params>
- <Tables>
- <Table name="IndentBillOnNet" />
- <Table name="IndentBillOnNetProduct" />
- </Tables>
- </SearchIndentBillOnNetPrevious>
- <SearchIndentBillOnNetNext CmdType="Text" CmdText=" DECLARE @ID_IndentBillOnNet uniqueidentifier
- DECLARE @IndentBillOnNetNo nvarchar(64)
- SELECT TOP 1 @IndentBillOnNetNo = IndentBillOnNet.No_IndentBillOnNet FROM IndentBillOnNet
- Join Customer On Customer.ID_Customer=IndentBillOnNet.ID_Customer
- WHERE IndentBillOnNet.No_IndentBillOnNet > @No_IndentBillOnNet
- And Customer.ID_Creator=case IsNull(DataLength(@Right),0) When 0 Then Customer.ID_Creator Else @Right End --added for validating right
- ORDER BY IndentBillOnNet.No_IndentBillOnNet
- SELECT IndentBillOnNet.*, Customer.No_Customer, Customer.Name_Customer, Customer.ShortName_Customer, Customer.Type_Customer,
- Customer.LastDiscount_Customer, Customer.PostalCode_Customer, ISNULL(b.Name_User, '') AS Name_Assessor, Customer.ID_Creator As CustomerCreator,
- c.Name_User AS LastModUserName,d.Name_User AS DeleteUserName
- FROM IndentBillOnNet
- LEFT JOIN Customer ON Customer.ID_Customer = IndentBillOnNet.ID_Customer
- LEFT JOIN AppUser b ON b.ID_User = IndentBillOnNet.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User = IndentBillOnNet.LastModUser_IndentBillOnNet
- LEFT JOIN AppUser d ON d.ID_User = IndentBillOnNet.DeleteUser_IndentBillOnNet
- WHERE IndentBillOnNet.No_IndentBillOnNet = @IndentBillOnNetNo
- SELECT @ID_IndentBillOnNet = IndentBillOnNet.ID_IndentBillOnNet FROM IndentBillOnNet WHERE IndentBillOnNet.No_IndentBillOnNet = @IndentBillOnNetNo
-
- SELECT [ID_IndentBillOnNetProduct]
- ,[No_IndentBillOnNetProduct]
- ,IndentBillOnNetProduct.[ID_IndentBillOnNet]
- ,IndentBillOnNetProduct.[ID_Product]
- ,[Quantity_IndentBillOnNetProduct]
- ,[UnitPrice_IndentBillOnNetProduct]
- ,IndentBillOnNet.No_IndentBillOnNet as [Comment_IndentBillOnNetProduct]
- ,[Amount_SaleBill],
- Product.No_Product, Product.Name_Product, Product.Unit_Product, A.AvailableQty_ProductStocks,
- (IndentBillOnNetProduct.Quantity_IndentBillOnNetProduct * IndentBillOnNetProduct.UnitPrice_IndentBillOnNetProduct) AS Amount_IndentBillOnNetProduct ,Price_Product
- FROM IndentBillOnNetProduct
- LEFT JOIN IndentBillOnNet on IndentBillOnNet.ID_IndentBillOnNet = IndentBillOnNetProduct.ID_IndentBillOnNet
- LEFT JOIN Product ON Product.ID_Product = IndentBillOnNetProduct.ID_Product
- Left join (Select ID_Product,Sum(AvailableQty_ProductStocks) As AvailableQty_ProductStocks From ProductStocks
- Group By ID_Product) A On A.ID_Product = Product.ID_Product
- WHERE IndentBillOnNetProduct.ID_IndentBillOnNet = @ID_IndentBillOnNet ORDER BY CAST(IndentBillOnNetProduct.No_IndentBillOnNetProduct AS INT)">
- <Params>
- <Param name="@No_IndentBillOnNet" type="IndentBillOnNet.No_IndentBillOnNet" Index="0" />
- <Param name="@Right" type="IndentBillOnNet.ID_Customer" Index="1" />
- </Params>
- <Tables>
- <Table name="IndentBillOnNet" />
- <Table name="IndentBillOnNetProduct" />
- </Tables>
- </SearchIndentBillOnNetNext>
- <SearchIndentBillOnNetLast CmdType="Text" CmdText=" DECLARE @ID_IndentBillOnNet uniqueidentifier
- DECLARE @IndentBillOnNetNo nvarchar(64)
- SELECT TOP 1 @IndentBillOnNetNo = IndentBillOnNet.No_IndentBillOnNet FROM IndentBillOnNet
- Join Customer On Customer.ID_Customer=IndentBillOnNet.ID_Customer
- WHERE Customer.ID_Creator=case IsNull(DataLength(@Right),0) When 0 Then Customer.ID_Creator Else @Right End --added for validating right
- ORDER BY IndentBillOnNet.No_IndentBillOnNet DESC
- SELECT IndentBillOnNet.*, Customer.No_Customer, Customer.Name_Customer, Customer.ShortName_Customer, Customer.Type_Customer,
- Customer.LastDiscount_Customer, Customer.PostalCode_Customer, ISNULL(b.Name_User, '') AS Name_Assessor, Customer.ID_Creator As CustomerCreator ,
- c.Name_User AS LastModUserName,d.Name_User AS DeleteUserName
- FROM IndentBillOnNet
- LEFT JOIN Customer ON Customer.ID_Customer = IndentBillOnNet.ID_Customer
- LEFT JOIN AppUser b ON b.ID_User = IndentBillOnNet.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User = IndentBillOnNet.LastModUser_IndentBillOnNet
- LEFT JOIN AppUser d ON d.ID_User = IndentBillOnNet.DeleteUser_IndentBillOnNet
- WHERE IndentBillOnNet.No_IndentBillOnNet = @IndentBillOnNetNo
- SELECT @ID_IndentBillOnNet = IndentBillOnNet.ID_IndentBillOnNet FROM IndentBillOnNet WHERE IndentBillOnNet.No_IndentBillOnNet = @IndentBillOnNetNo
-
- SELECT
- [ID_IndentBillOnNetProduct]
- ,[No_IndentBillOnNetProduct]
- ,IndentBillOnNetProduct.[ID_IndentBillOnNet]
- ,IndentBillOnNetProduct.[ID_Product]
- ,[Quantity_IndentBillOnNetProduct]
- ,[UnitPrice_IndentBillOnNetProduct]
- ,IndentBillOnNet.No_IndentBillOnNet as [Comment_IndentBillOnNetProduct]
- ,[Amount_SaleBill]
- , Product.No_Product, Product.Name_Product, Product.Unit_Product, A.AvailableQty_ProductStocks,
- (IndentBillOnNetProduct.Quantity_IndentBillOnNetProduct * IndentBillOnNetProduct.UnitPrice_IndentBillOnNetProduct) AS Amount_IndentBillOnNetProduct ,Price_Product
- FROM IndentBillOnNetProduct
- LEFT JOIN IndentBillOnNet on IndentBillOnNet.ID_IndentBillOnNet = IndentBillOnNetProduct.ID_IndentBillOnNet
- LEFT JOIN Product ON Product.ID_Product = IndentBillOnNetProduct.ID_Product
- Left join (Select ID_Product,Sum(AvailableQty_ProductStocks) As AvailableQty_ProductStocks From ProductStocks
- Group By ID_Product) A On A.ID_Product = Product.ID_Product
- WHERE IndentBillOnNetProduct.ID_IndentBillOnNet = @ID_IndentBillOnNet ORDER BY CAST(IndentBillOnNetProduct.No_IndentBillOnNetProduct AS INT)">
- <Params>
- <Param name="@Right" type="IndentBillOnNet.ID_Customer" Index="0" />
- </Params>
- <Tables>
- <Table name="IndentBillOnNet" />
- <Table name="IndentBillOnNetProduct" />
- </Tables>
- </SearchIndentBillOnNetLast>
- <UpdateDisable CmdType="Text" CmdText=" DECLARE @ID_IndentBillOnNet uniqueidentifier
- SELECT @ID_IndentBillOnNet = IndentBillOnNet.ID_IndentBillOnNet
- FROM IndentBillOnNet
- WHERE IndentBillOnNet.No_IndentBillOnNet = @No_IndentBillOnNet
-
- Update IndentBillOnNet Set Disable_IndentBillOnNet = 1
- Where ID_IndentBillOnNet = @ID_IndentBillOnNet
- ">
- <Params>
- <Param name="@No_IndentBillOnNet" type="IndentBillOnNet.No_IndentBillOnNet" Index="0" />
- </Params>
- <Tables>
- <Table name="tempTable" />
- </Tables>
- </UpdateDisable>
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- NewInstance();
- btnDelete.Enabled=false;
- toolBar.EnableAudit = false;
- toolBar.EnableExport =false;
- toolBar.EnableSubmit = false;
- toolBar.EnableModify = false;
- txtComment.ReadOnly =true;
- tbCustomerNo.ReadOnly =true;
- #IndentBillOnNet.LastModDate_IndentBillOnNet = DBNull();
- #IndentBillOnNet.DeleteDate_IndentBillOnNet = DBNull();
- UpdateForm(true,"");
- </Search>
- <View>
- dgProduct.ReadOnly = true;
- if(Equals(#IndentBillOnNet.ID_Assessor, DBNull()))
- {
- if(#IndentBillOnNet.Disable_IndentBillOnNet==false)
- {
- toolBar.EnableAudit = GetRight(@Title,"审核");
- toolBar.EnableModify = GetRight(@Title,"修改");
- }
- else
- {
- toolBar.EnableAudit = false;
- toolBar.EnableModify = false;
- }
- btnDelete.Enabled = false;
- <!-- txtComment.ReadOnly =true;-->
- }
- else
- {
- toolBar.EnableAudit = false;
- btnDelete.Enabled = GetRight(@Title,"删除");
- <!-- txtComment.ReadOnly =false;-->
- toolBar.EnableModify = false;
- }
- toolBar.EnablePrint = GetRight(@Title,"打印");
- toolBar.EnableExport =true;
- toolBar.EnableSubmit = false;
- txtComment.ReadOnly =true;
- UpdateForm(true, "");
- tbNo.Focus();
- </View>
- <Modify>
- txtBillComment.ReadOnly = false;
- dgProduct.ReadOnly = false;
- toolBar.EnableSubmit = GetRight(@Title,"修改");
- toolBar.EnableModify = false;
- toolBar.EnableDelete = false;
- toolBar.EnableAudit = false;
- toolBar.EnableExport = false;
- #IndentBillOnNet.LastModUser_IndentBillOnNet = GetLoginUserID();
- #IndentBillOnNet.LastModUserName = GetCurrentUser();
- #IndentBillOnNet.LastModDate_IndentBillOnNet = DateTimeNow();
- UpdateForm(true, "");
- </Modify>
- <SubmitButtonClick>
- dgProduct.ReadOnly = true;
- #IndentBillOnNet.LastModDate_IndentBillOnNet = DateTimeNow();
- txtBillComment.ReadOnly = true;
- #IndentBillOnNet.FeedbackComment_IndentBillOnNet = txtBillComment.CValue;
- Update();
- ChangeMode("View");
- </SubmitButtonClick>
- <AuditLable>
- BeginAudit();
- #IndentBillOnNet.ID_Assessor = GetLoginUserID();
- #IndentBillOnNet.Name_Assessor = GetCurrentUser();
- #IndentBillOnNet.AssessDate_IndentBillOnNet = DateTimeNow();
- Audit();
- ChangeMode("View");
- EndAudit();
- </AuditLable>
- </Lables>
- </Form>
- </Forms>
|