123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442 |
- <?xml version="1.0" encoding="utf-8"?>
- <!-- 编辑使用 XMLSpy v2006 U (http://www.altova.com) 由 any (any) -->
- <Forms>
- <Form Name="FrmCompany">
- <Client>
- <Events>
- <Load><![CDATA[
- @HaveSearchCompanyList=false;
- @Title="公司基本资料";
- GetSchema();
- ChangeMode("Search");
- ]]></Load>
- <Closing>
- ;
- </Closing>
- <Closed>
- ;
- </Closed>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search"/>
- </Search>
- <New>
- <Lable name="New"/>
- </New>
- <View>
- <Lable name="View"/>
- </View>
- <Modify>
- <Lable name="Modify"/>
- </Modify>
- </Mode>
- <Controls>
- <IKTextButton name="tbNo" DataSource="Company.No_Company">
- <Events>
- <Enter><![CDATA[
- if(tbNo.ReadOnly == false)
- {
- if(tbNo.CValue != StringEmpty())
- {
- UpdateForm(false, "");
- if(Search("SearchCompanyWithNo", tbNo.CValue))
- {
- ChangeMode("View");
- }
- else
- {
- MessageBox("该公司编号不存在!",@Title);
- }
- }
- else
- {
- MessageBox("请输入公司编号!",@Title);
- }
- }
- ]]>
- </Enter>
- <Click>
- @Temp = ShowSearchBox("CompanySearch","INFOMATION");
- if(@Temp != StringEmpty())
- {
- tbNo.CValue = @Temp;
- ActiveControlEvent("tbNo", "Enter");
- UpdateForm(false, "");
- if(Search("SearchCompanyWithNo", tbNo.CValue))
- {
- ChangeMode("View");
- }
- }
- </Click>
- </Events>
- </IKTextButton>
- <IKTextBox name="txtShortName" DataSource="Company.ShortName_Company"/>
- <IKTextBox name="txtName" DataSource="Company.Name_Company"/>
- <IKTextBox name="txtRegistedAddress" DataSource="Company.RegistedAddress_Company"/>
- <IKCountryCombo name="cbCountry" DataSource="Company.Country_Company"/>
- <IKTextBox name="txtPostalCode" DataSource="Company.PostalCode_Company"/>
- <IKTextBox name="txtTel" DataSource="Company.Tel_Company"/>
- <IKTextBox name="txtFax" DataSource="Company.Fax_Company" />
- <IKTextBox name="txtSendAddress" DataSource="Company.SendAddress_Company"/>
- <IKDateTimeText name="dttCreateDate" DataSource="Company.CreateDate_Company"/>
- <IKTextBox name="txtCreator" DataSource="Company.Creator_Company"/>
- <IKDateTimePause name="dtpIsSuspend" DataSource="Company.SuspendDate_Company"/>
- <IKTextBox name="txtComment" DataSource="Company.Comment_Company"/>
- <IKTextBox name="txtBank" DataSource="Company.Bank_Company"/>
- <IKTextBox name="txtMender" DataSource="Company.LastModUser_Company"></IKTextBox>
- <IKDateTimeText name="dttMendeDate" DataSource="Company.LastModDate_Company"></IKDateTimeText>
- <IKTextBox name="txtAccount" DataSource="Company.Account_Company"/>
- <IKTextBox name="txtRevenueRegisterNo" DataSource="Company.RevenueRegisterNo_Company"/>
- <IKTextBox name="txtInvoiceTitle" DataSource="Company.InvoiceTitle_Company"/>
- <IKTextBox name="txtInvoiceAddress" DataSource="Company.InvoiceAddress_Company"/>
- <IKDataGridEx name="dgCompany" DataSource="CompanyList" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="CompanyList.No_Company" />
- <DataColumn Index="1" DataSource="CompanyList.ShortName_Company" />
- <Events>
- <RowHeaderDoubleClick>
- if(Search("SearchCompanyWithNo",#CompanyList.No_Company))
- {
- ChangeMode("View");
- }
- </RowHeaderDoubleClick>
- </Events>
- </IKDataGridEx>
-
- <IKFormToolBar name="toolBar">
- <Events>
- <ClickFirst>
-
- if(Search("SearchCompanyFirst", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickFirst>
- <ClickPrev>
-
- if(Search("SearchCompanyPrevious", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickPrev>
- <ClickNext>
-
- if(Search("SearchCompanyNext", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickNext>
- <ClickLast>
- if(Search("SearchCompanyLast", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickLast>
- <ClickEmpty>
- ChangeMode("Search");
- </ClickEmpty>
- <ClickNew>
- ;
- </ClickNew>
- <ClickSubmit>
- <Lable name="SubmitButtonClick"/>
- </ClickSubmit>
- <ClickModify>
- ChangeMode("Modify");
- </ClickModify>
- <ClickDelete>
- Delete(); ChangeMode("Search");
- </ClickDelete>
- <ClickPrint>
- #Company.CountryName = cbCountry.Text;
- PrintReport();
- </ClickPrint>
- <ClickAudit>
- ;
- </ClickAudit>
- <ClickUnAudit>
- ;
- </ClickUnAudit>
- <ClickImport>
- ;
- </ClickImport>
- <ClickExport>
- ;
- </ClickExport>
- <ClickClose>
- ;
- </ClickClose>
- <ClickExpand>
- if(toolBar.ExpandForm==true)
- {
- pnRight.Visible=true;<!--PanelRight is not existed-->
- if(!@HaveSearchCompanyList)
- {
- Search("SearchCompanyList");
- @HaveSearchCompanyList=true;
- }
-
- }
- else
- {
- pnRight.Visible=false;
- }
- </ClickExpand>
- </Events>
- </IKFormToolBar>
- </Controls>
- <LockInfomation LockID="ID_Company" LockNO="No_Company" LockSearchFunction="SearchCompanyWithNo"/>
- <ChildForms>
- <ChildForm name="CompanySearch" DataSource="Company" SearchFunction="SearchAllCompany" SearchFunctionByNo="SearchCompanyWithNo" MappingName="公司">
- <DataColumn Index="0" MappingName="#Company.No_Company" HeaderText="公司编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#Company.ShortName_Company" HeaderText="公司简称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="Company" Type="Parent">
- <GetSchema ConnectDB="ManageDB" CmdType="Text" CmdText=" SELECT TOP 0 Company.* , convert(nvarchar(64),'') as CountryName FROM Company"/>
- <Update ConnectDB="ManageDB" CmdType="Text" CmdText="UPDATE Company SET
- ShortName_Company = @ShortName_Company,
- Name_Company = @Name_Company,
- RegistedAddress_Company = @RegistedAddress_Company,
- Country_Company = @Country_Company,
- PostalCode_Company = @PostalCode_Company,
- SendAddress_Company = @SendAddress_Company,
- CreateDate_Company = @CreateDate_Company,
- Creator_Company = @Creator_Company,
- Comment_Company = @Comment_Company,
- Bank_Company = @Bank_Company,
- Account_Company = @Account_Company,
- RevenueRegisterNo_Company = @RevenueRegisterNo_Company,
- InvoiceTitle_Company = @InvoiceTitle_Company,
- InvoiceAddress_Company = @InvoiceAddress_Company,
- SuspendDate_Company = @SuspendDate_Company,
- Fax_Company=@Fax_Company,
- Tel_Company=@Tel_Company,
- LastModUser_Company=@LastModUser_Company,
- LastModDate_Company=@LastModDate_Company
- WHERE ID_Company = @ID_Company">
- <Params>
- <Param name="@ID_Company" type="Company.ID_Company" sourceColumn="ID_Company"/>
- <Param name="@ShortName_Company" type="Company.ShortName_Company" sourceColumn="ShortName_Company"/>
- <Param name="@Name_Company" type="Company.Name_Company" sourceColumn="Name_Company"/>
- <Param name="@RegistedAddress_Company" type="Company.RegistedAddress_Company" sourceColumn="RegistedAddress_Company"/>
- <Param name="@Country_Company" type="Company.Country_Company" sourceColumn="Country_Company"/>
- <Param name="@PostalCode_Company" type="Company.PostalCode_Company" sourceColumn="PostalCode_Company"/>
- <Param name="@SendAddress_Company" type="Company.SendAddress_Company" sourceColumn="SendAddress_Company"/>
- <Param name="@CreateDate_Company" type="Company.CreateDate_Company" sourceColumn="CreateDate_Company"/>
- <Param name="@Creator_Company" type="Company.Creator_Company" sourceColumn="Creator_Company"/>
- <Param name="@Comment_Company" type="Company.Comment_Company" sourceColumn="Comment_Company"/>
- <Param name="@Bank_Company" type="Company.Bank_Company" sourceColumn="Bank_Company"/>
- <Param name="@Account_Company" type="Company.Account_Company" sourceColumn="Account_Company"/>
- <Param name="@RevenueRegisterNo_Company" type="Company.RevenueRegisterNo_Company" sourceColumn="RevenueRegisterNo_Company"/>
- <Param name="@InvoiceTitle_Company" type="Company.InvoiceTitle_Company" sourceColumn="InvoiceTitle_Company"/>
- <Param name="@InvoiceAddress_Company" type="Company.InvoiceAddress_Company" sourceColumn="InvoiceAddress_Company"/>
- <Param name="@SuspendDate_Company" type="Company.SuspendDate_Company" sourceColumn="SuspendDate_Company"/>
- <Param name="@Fax_Company" type="Company.Fax_Company" sourceColumn="Fax_Company"/>
- <Param name="@Tel_Company" type="Company.Tel_Company" sourceColumn="Tel_Company"/>
- <Param name="@LastModUser_Company" type="Company.LastModUser_Company" sourceColumn="LastModUser_Company"/>
- <Param name="@LastModDate_Company" type="Company.LastModDate_Company" sourceColumn="LastModDate_Company"/>
- </Params>
- </Update>
- </Table>
- <Table name="CompanyList" Type="Other">
- <GetSchema ConnectDB="ManageDB" CmdType="Text" CmdText="SELECT Top 0 Company.No_Company,Company.ShortName_Company FROM Company"/>
- </Table>
- </Tables>
- <Search>
- <SearchAllCompany ConnectDB="ManageDB" CmdType="Text" CmdText="SELECT Company.No_Company,Company.ShortName_Company FROM Company">
- <Tables>
- <Table name="AllCompany" />
- </Tables>
- </SearchAllCompany>
- <SearchCompanyList ConnectDB="ManageDB" CmdType="Text" CmdText=" SELECT Company.No_Company,Company.ShortName_Company FROM Company">
- <Tables>
- <Table name="CompanyList" />
- </Tables>
- </SearchCompanyList>
- <SearchCompanyWithNo ConnectDB="ManageDB" CmdType="Text" CmdText="DECLARE @ID_Company uniqueidentifier SELECT Company.* FROM Company where Company.No_Company = @No_Company
- SELECT @ID_Company = Company.ID_Company FROM Company WHERE Company.No_Company = @No_Company
- ">
- <Params>
- <Param name="@No_Company" type="Company.No_Company" Index="0"/>
- </Params>
- <Tables>
- <Table name="Company"/>
- </Tables>
- </SearchCompanyWithNo>
- <SearchCompanyFirst ConnectDB="ManageDB" CmdType="Text" CmdText=" DECLARE @ID_Company uniqueidentifier DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_Company
- SELECT TOP 1 @NextNo = Company.No_Company FROM Company ORDER BY Company.No_Company
- SELECT Company.* FROM Company where Company.No_Company = @NextNo
- SELECT @ID_Company = Company.ID_Company FROM Company WHERE Company.No_Company = @NextNo
- ">
- <Params>
- <Param name="@No_Company" type="Company.No_Company" Index="0"/>
- </Params>
- <Tables>
- <Table name="Company"/>
- </Tables>
- </SearchCompanyFirst>
- <SearchCompanyPrevious ConnectDB="ManageDB" CmdType="Text" CmdText="DECLARE @ID_Company uniqueidentifier DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_Company
- SELECT TOP 1 @NextNo = Company.No_Company FROM Company WHERE Company.No_Company < @No_Company ORDER BY Company.No_Company Desc
- SELECT Company.* FROM Company where Company.No_Company = @NextNo
- SELECT @ID_Company = Company.ID_Company FROM Company WHERE Company.No_Company = @NextNo
- ">
- <Params>
- <Param name="@No_Company" type="Company.No_Company" Index="0"/>
- </Params>
- <Tables>
- <Table name="Company"/>
- </Tables>
- </SearchCompanyPrevious>
- <SearchCompanyNext ConnectDB="ManageDB" CmdType="Text" CmdText="DECLARE @ID_Company uniqueidentifier DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_Company
- SELECT TOP 1 @NextNo = Company.No_Company FROM Company WHERE Company.No_Company > @No_Company ORDER BY Company.No_Company
- SELECT Company.* FROM Company where Company.No_Company = @NextNo
- SELECT @ID_Company = Company.ID_Company FROM Company WHERE Company.No_Company = @NextNo
- ">
- <Params>
- <Param name="@No_Company" type="Company.No_Company" Index="0"/>
- </Params>
- <Tables>
- <Table name="Company"/>
-
- </Tables>
- </SearchCompanyNext>
- <SearchCompanyLast ConnectDB="ManageDB" CmdType="Text" CmdText="DECLARE @ID_Company uniqueidentifier DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_Company
- SELECT TOP 1 @NextNo = Company.No_Company FROM Company ORDER BY Company.No_Company DESC
- SELECT Company.* FROM Company where Company.No_Company = @NextNo
- SELECT @ID_Company = Company.ID_Company FROM Company WHERE Company.No_Company = @NextNo
- ">
- <Params>
- <Param name="@No_Company" type="Company.No_Company" Index="0"/>
- </Params>
- <Tables>
- <Table name="Company"/>
-
- </Tables>
- </SearchCompanyLast>
-
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- NewInstance();
- tbNo.ReadOnly=false;
- txtShortName.ReadOnly=true;
- txtName.ReadOnly=true;
- txtRegistedAddress.ReadOnly=true;
- cbCountry.Enabled=false;
- txtPostalCode.ReadOnly=true;
- txtTel.ReadOnly=true;
- txtFax.ReadOnly=true;
- dtpIsSuspend.Enabled=false;
- txtComment.ReadOnly=true;
- txtSendAddress.ReadOnly=true;
- txtBank.Enabled=false;
- txtAccount.ReadOnly=true;
- txtRevenueRegisterNo.ReadOnly=true;
- txtInvoiceTitle.ReadOnly=true;
- txtInvoiceAddress.ReadOnly=true;
- toolBar.EnableSubmit=false;
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- #Company.CreateDate_Company=DBNull();
- #Company.SuspendDate_Company=DBNull();
- #Company.LastModUser_Company=DBNull();
- #Company.LastModDate_Company=DBNull();
- UpdateForm(true, "");
- tbNo.Focus();
- @Status=0;
- </Search>
- <View>
- tbNo.ReadOnly=false;
- txtShortName.ReadOnly=true;
- txtName.ReadOnly=true;
- txtRegistedAddress.ReadOnly=true;
- cbCountry.Enabled=false;
- txtPostalCode.ReadOnly=true;
- txtTel.ReadOnly=true;
- txtFax.ReadOnly=true;
- dtpIsSuspend.Enabled=false;
- txtComment.ReadOnly=true;
- txtSendAddress.ReadOnly=true;
- txtBank.Enabled=false;
- txtAccount.ReadOnly=true;
- txtRevenueRegisterNo.ReadOnly=true;
- txtInvoiceTitle.ReadOnly=true;
- txtInvoiceAddress.ReadOnly=true;
- toolBar.EnableSubmit=false;
- if(Equals(GetLoginCompanyID(),#Company.ID_Company))
- toolBar.EnableModify=GetRight(@Title,"新增");
- else
- toolBar.EnableModify=false;
- toolBar.EnableDelete=GetRight(@Title,"删除");
-
- UpdateForm(true, "");
- @Status=2;
- </View>
- <Modify>
- tbNo.ReadOnly=true;
- txtShortName.ReadOnly=false;
- txtName.ReadOnly=false;
- txtRegistedAddress.ReadOnly=false;
- cbCountry.Enabled=true;
- txtPostalCode.ReadOnly=false;
- txtTel.ReadOnly=false;
- txtFax.ReadOnly=false;
- dtpIsSuspend.Enabled=false;
- txtComment.ReadOnly=false;
- txtSendAddress.ReadOnly=false;
- txtBank.Enabled=true;
- txtAccount.ReadOnly=false;
- txtRevenueRegisterNo.ReadOnly=false;
- txtInvoiceTitle.ReadOnly=false;
- txtInvoiceAddress.ReadOnly=false;
- toolBar.EnableSubmit=GetRight(@Title,"新增");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=GetRight(@Title,"删除");
- #Company.LastModUser_Company=GetCurrentUser();
- #Company.LastModDate_Company=DateTimeNow();
- UpdateForm(true, "");
- txtShortName.Focus();
- @Status=3;
- </Modify>
- <SubmitButtonClick><![CDATA[
- if(txtShortName.CValue==StringEmpty())
- {
- MessageBox("请输入公司简称!",@Title);
- txtShortName.Focus();
- return;
- }
- if(txtName.CValue==StringEmpty())
- {
- MessageBox("请输入公司名称!",@Title);
- txtName.Focus();
- return;
- }
- if(cbCountry.CValue==0)
- {
- tbDetail.SelectedIndex=0;
- MessageBox("请输入国家名称!",@Title);
- cbCountry.Focus();
- return;
- }
- UpdateForm(false, "");
- if(@Status == 3)
- {
- #Company.LastModDate_Company=DateTimeNow();
- Update();
- }
- ChangeMode("View");
- ]]></SubmitButtonClick>
- </Lables>
- </Form>
- </Forms>
|