123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802 |
- <?xml version="1.0" encoding="utf-8" ?>
- <Forms>
- <Form Name="FrmTransporter">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @Title="运输商基本资料";
- @HaveSearchTransporterList=false;
- GetSchema();
- ChangeMode("Search");
- Search("SearchZone");
- Search("SearchName");
- ]]>
- </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="Transporter.No_Transporter">
- <Events>
- <Enter>
- <![CDATA[
- if(tbNo.ReadOnly == false)
- {
- if(tbNo.CValue != StringEmpty())
- {
- UpdateForm(false, "");
- if(Search("SearchTransporterWithNo", tbNo.CValue))
- {
- Search("SearchMainPrincipal");
- ChangeMode("View");
- }
- else
- {
- Search("SearchMainPrincipal");
- if(GetRight(@Title,"新增"))
- ChangeMode("New");
- else
- MessageBox("您没有新增运输商基本资料的权限!",@Title);
- }
- }
- else
- {
- MessageBox("请输入运输商编号!",@Title);
- }
- }
- ]]>
- </Enter>
- <Click>
- @Temp = ShowSearchBox("TransporterSearch","INFOMATION",tbNo.CValue);
- if(@Temp != StringEmpty())
- {
- tbNo.CValue = @Temp;
- ActiveControlEvent("tbNo", "Enter");
- UpdateForm(false, "");
- if(Search("SearchTransporterWithNo", tbNo.CValue))
- {
- Search("SearchMainPrincipal");
- ChangeMode("View");
- }
- }
- </Click>
- </Events>
- </IKTextButton>
- <IKTextBox name="txtShortName" DataSource="Transporter.ShortName_Transporter"></IKTextBox>
- <IKTextBox name="txtName" DataSource="Transporter.Name_Transporter"></IKTextBox>
- <IKTextBox name="txtRegistedAddress" DataSource="Transporter.RegistedAddress_Transporter"></IKTextBox>
- <IKCountryCombo name="cbCountry" DataSource="Transporter.Country_Transporter"></IKCountryCombo>
- <IKTextBox name="txtPostalCode" DataSource="Transporter.PostalCode_Transporter"></IKTextBox>
-
- <IKTextBox name="txtMender" DataSource="Transporter.LastModUser_TransporterName"></IKTextBox>
- <IKDateTimeText name="dttMendDate" DataSource="Transporter.LastModDate_Transporter"></IKDateTimeText>
-
- <IKComboBoxEx name="cbMainPrincipal" ValueSource="Transporter.ID_Principal" DisplaySource="Transporter.MainPrincipal_Transporter" NoSource="Transporter.No_Employee"
- ValueMember="ID_Employee" DataSource="Employee" DisplayMember="Name_Employee" NoMember="No_Employee">
- <Events>
- <Reload>
- UpdateForm(false, "cbMainPrincipal");
- Search("SearchMainPrincipal");
- UpdateForm(true, "cbMainPrincipal");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKTextBox name="txtLinkman" DataSource="Transporter.Linkman_Transporter"></IKTextBox>
- <IKDateTimeText name="dttCreateDate" DataSource="Transporter.CreateDate_Transporter"></IKDateTimeText>
- <IKTextBox name="txtCreator" DataSource="Transporter.CreatorName_Transporter"></IKTextBox>
- <IKDateTimePause name="dtpIsSuspend" DataSource="Transporter.SuspendDate_Transporter"></IKDateTimePause>
- <IKTextBox name="txtComment" DataSource="Transporter.Comment_Transporter"></IKTextBox>
- <IKPhoneControl name="pcFax" DataSource="Fax" ValueMember="ID_Fax" DisplayMember="Name_Fax" NoMember="No_Fax" FocusMember="Focus_Fax">
- </IKPhoneControl>
- <IKPhoneControl name="pcPhone" DataSource="Telephone" ValueMember="ID_Telephone" DisplayMember="Name_Telephone" FocusMember="Focus_Telephone" NoMember="No_Telephone">
- </IKPhoneControl>
- <IKDataGridEx name="dgFreightMode" DataSource="FreightMode" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="FreightMode.Zone_FreightMode" >
- <IKDataGridComboBoxColumn DisplaySourceEx="FreightMode.Zone_FreightMode" ValueSourceEx="FreightMode.Zone_FreightMode" DataSourceEx="Zone" DisplayMemberEx="Name_TypeDef" ValueMemberEx="Name_TypeDef">
- <Events>
- <Reload>
- Search("SearchZone");
- SetDataGridColumnDataSource(0,"dgFreightMode");
- </Reload>
- </Events>
- </IKDataGridComboBoxColumn>
- </DataColumn>
-
- <DataColumn Index="1" DataSource="FreightMode.Name_FreightMode" >
- <IKDataGridComboBoxColumn DisplaySourceEx="FreightMode.Name_FreightMode" ValueSourceEx="FreightMode.Name_FreightMode" DataSourceEx="Name" DisplayMemberEx="Name_TypeDef" ValueMemberEx="Name_TypeDef" >
- <Events>
- <Reload>
- Search("SearchName");
- SetDataGridColumnDataSource(1,"dgFreightMode");
- </Reload>
- </Events>
- </IKDataGridComboBoxColumn>
- </DataColumn>
-
- <DataColumn Index="2" DataSource="FreightMode.Comment_FreightMode" />
- </IKDataGridEx>
- <IKDataGridEx name="dgTransporter" DataSource="TransporterList" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="TransporterList.No_Transporter" />
- <DataColumn Index="1" DataSource="TransporterList.ShortName_Transporter" />
- <Events>
- <RowHeaderDoubleClick>
- if(Search("SearchTransporterWithNo",#TransporterList.No_Transporter))
- {
- ChangeMode("View");
- }
- </RowHeaderDoubleClick>
- </Events>
- </IKDataGridEx>
- <IKCheckBox name="ckDisplay" DataSource="Transporter.IsDisplay">
- <Events>
- <CheckedChanged>
- if(ckDisplay.Checked)
- Search("SearchAllTransporterList");
- else
- Search("SearchTransporterList");
-
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <IKFormToolBar name="toolBar">
- <Events>
- <ClickFirst>
- if(Search("SearchTransporterFirst", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickFirst>
- <ClickPrev>
- if(Search("SearchTransporterPrevious", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickPrev>
- <ClickNext>
- if(Search("SearchTransporterNext", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickNext>
- <ClickLast>
- if(Search("SearchTransporterLast", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickLast>
- <ClickNew>
- ;
- </ClickNew>
- <ClickEmpty>
- ChangeMode("Search");
- </ClickEmpty>
- <ClickSubmit>
- <Lable name="SubmitButtonClick" />
- </ClickSubmit>
- <ClickModify>
- ChangeMode("Modify");
- </ClickModify>
- <ClickDelete>
- Delete(); ChangeMode("Search");
- </ClickDelete>
- <ClickPrint>
- #Transporter.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(!@HaveSearchTransporterList)
- {
- Search("SearchTransporterList");
- @HaveSearchTransporterList=true;
- }
- }
- else
- {
- pnRight.Visible=false;
- }
- </ClickExpand>
- </Events>
- </IKFormToolBar>
- </Controls>
- <Tables>
- <Table name="Transporter">
- <Events>
- ;
- </Events>
- </Table>
- <Table name="FreightMode">
- <Events>
- ;
- </Events>
- </Table>
- </Tables>
- <LockInfomation LockID="ID_Transporter" LockNO="No_Transporter" LockSearchFunction="SearchTransporterWithNo"/>
- <ChildForms>
- <ChildForm name="TransporterSearch" DataSource="Transporter" SearchFunction="SearchAllTransporter" SearchFunctionByNo="SearchTransporterWithNo" MappingName="运输商">
- <DataColumn Index="0" MappingName="#Transporter.No_Transporter" HeaderText="运输商编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#Transporter.ShortName_Transporter" HeaderText="运输商简称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="Transporter" Type="Parent">
- <GetSchema CmdType="Text" CmdText=" SELECT top 0 Transporter.*,convert(nvarchar(64),'') as CountryName, '' as No_Employee,'' as MainPrincipal_Transporter,a.Name_User AS CreatorName_Transporter,b.Name_User AS LastModUser_TransporterName ,convert(bit,1) As IsDisplay FROM Transporter
- left join AppUser a on a.ID_User = Transporter.Creator_Transporter
- left join AppUser b on b.ID_User = Transporter.LastModUser_Transporter" />
- <New CmdType="Text" CmdText="INSERT INTO Transporter(ID_Transporter,No_Transporter,ShortName_Transporter,Name_Transporter,RegistedAddress_Transporter,Country_Transporter,PostalCode_Transporter,Linkman_Transporter,ID_Principal,CreateDate_Transporter,Creator_Transporter,Comment_Transporter,SuspendDate_Transporter,LastModUser_Transporter,LastModDate_Transporter)
- VALUES(@ID_Transporter,@No_Transporter,@ShortName_Transporter,@Name_Transporter,@RegistedAddress_Transporter,@Country_Transporter,@PostalCode_Transporter,@Linkman_Transporter,@ID_Principal,@CreateDate_Transporter,@Creator_Transporter,@Comment_Transporter,@SuspendDate_Transporter,@LastModUser_Transporter,@LastModDate_Transporter)">
- <Params>
- <Param name="@ID_Transporter" type="Transporter.ID_Transporter" sourceColumn="ID_Transporter" />
- <Param name="@No_Transporter" type="Transporter.No_Transporter" sourceColumn="No_Transporter" />
- <Param name="@ShortName_Transporter" type="Transporter.ShortName_Transporter" sourceColumn="ShortName_Transporter" />
- <Param name="@Name_Transporter" type="Transporter.Name_Transporter" sourceColumn="Name_Transporter" />
- <Param name="@RegistedAddress_Transporter" type="Transporter.RegistedAddress_Transporter"
- sourceColumn="RegistedAddress_Transporter" />
- <Param name="@Country_Transporter" type="Transporter.Country_Transporter" sourceColumn="Country_Transporter" />
- <Param name="@PostalCode_Transporter" type="Transporter.PostalCode_Transporter" sourceColumn="PostalCode_Transporter" />
- <Param name="@Linkman_Transporter" type="Transporter.Linkman_Transporter" sourceColumn="Linkman_Transporter" />
- <Param name="@ID_Principal" type="Transporter.ID_Principal" sourceColumn="ID_Principal" />
- <Param name="@CreateDate_Transporter" type="Transporter.CreateDate_Transporter" sourceColumn="CreateDate_Transporter" />
- <Param name="@Creator_Transporter" type="Transporter.Creator_Transporter" sourceColumn="Creator_Transporter" />
- <Param name="@Comment_Transporter" type="Transporter.Comment_Transporter" sourceColumn="Comment_Transporter" />
- <Param name="@SuspendDate_Transporter" type="Transporter.SuspendDate_Transporter" sourceColumn="SuspendDate_Transporter" />
-
- <Param name="@LastModUser_Transporter" type="Transporter.LastModUser_Transporter" sourceColumn="LastModUser_Transporter" />
- <Param name="@LastModDate_Transporter" type="Transporter.LastModDate_Transporter" sourceColumn="LastModDate_Transporter" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="UPDATE Transporter SET No_Transporter = @No_Transporter, ShortName_Transporter = @ShortName_Transporter, Name_Transporter = @Name_Transporter, RegistedAddress_Transporter = @RegistedAddress_Transporter, Country_Transporter = @Country_Transporter, PostalCode_Transporter=@PostalCode_Transporter,LastModUser_Transporter=@LastModUser_Transporter,LastModDate_Transporter=@LastModDate_Transporter,Linkman_Transporter=@Linkman_Transporter,ID_Principal=@ID_Principal,CreateDate_Transporter=@CreateDate_Transporter,Creator_Transporter=@Creator_Transporter,Comment_Transporter=@Comment_Transporter,SuspendDate_Transporter=@SuspendDate_Transporter WHERE ID_Transporter = @ID_Transporter">
- <Params>
- <Param name="@ID_Transporter" type="Transporter.ID_Transporter" sourceColumn="ID_Transporter" />
- <Param name="@No_Transporter" type="Transporter.No_Transporter" sourceColumn="No_Transporter" />
- <Param name="@ShortName_Transporter" type="Transporter.ShortName_Transporter" sourceColumn="ShortName_Transporter" />
- <Param name="@Name_Transporter" type="Transporter.Name_Transporter" sourceColumn="Name_Transporter" />
- <Param name="@RegistedAddress_Transporter" type="Transporter.RegistedAddress_Transporter"
- sourceColumn="RegistedAddress_Transporter" />
- <Param name="@Country_Transporter" type="Transporter.Country_Transporter" sourceColumn="Country_Transporter" />
- <Param name="@PostalCode_Transporter" type="Transporter.PostalCode_Transporter" sourceColumn="PostalCode_Transporter" />
- <Param name="@Linkman_Transporter" type="Transporter.Linkman_Transporter" sourceColumn="Linkman_Transporter" />
- <Param name="@ID_Principal" type="Transporter.ID_Principal" sourceColumn="ID_Principal" />
- <Param name="@CreateDate_Transporter" type="Transporter.CreateDate_Transporter" sourceColumn="CreateDate_Transporter" />
- <Param name="@Creator_Transporter" type="Transporter.Creator_Transporter" sourceColumn="Creator_Transporter" />
- <Param name="@Comment_Transporter" type="Transporter.Comment_Transporter" sourceColumn="Comment_Transporter" />
- <Param name="@SuspendDate_Transporter" type="Transporter.SuspendDate_Transporter" sourceColumn="SuspendDate_Transporter" />
- <Param name="@LastModUser_Transporter" type="Transporter.LastModUser_Transporter" sourceColumn="LastModUser_Transporter" />
- <Param name="@LastModDate_Transporter" type="Transporter.LastModDate_Transporter" sourceColumn="LastModDate_Transporter" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="DELETE Fax WHERE ID_Person = @ID_Transporter
- DELETE Telephone WHERE ID_Person = @ID_Transporter
- DELETE FreightMode WHERE ID_Transporter = @ID_Transporter
- DELETE Transporter WHERE ID_Transporter = @ID_Transporter">
- <Params>
- <Param name="@ID_Transporter" type="Transporter.ID_Transporter" sourceColumn="ID_Transporter" />
- </Params>
- </Delete>
- <FKErrorReport ErrorMessage="该运输商已被引用,删除失败!"/>
- <UNIQUEErrorReport ErrorMessage="该运输商编号已存在,提交失败!"/>
- </Table>
- <Table name="FreightMode" Type="Child">
- <GetSchema CmdType="Text" CmdText="SELECT top 0 * FROM FreightMode" />
- <New CmdType="Text" CmdText="INSERT INTO FreightMode(ID_FreightMode, ID_Transporter, Zone_FreightMode, Name_FreightMode, Comment_FreightMode) VALUES(@ID_FreightMode, @ID_Transporter, @Zone_FreightMode, @Name_FreightMode, @Comment_FreightMode)">
- <Params>
- <Param name="@ID_FreightMode" type="FreightMode.ID_FreightMode" sourceColumn="ID_FreightMode" />
- <Param name="@ID_Transporter" type="FreightMode.ID_Transporter" sourceColumn="ID_Transporter" />
- <Param name="@Zone_FreightMode" type="FreightMode.Zone_FreightMode" sourceColumn="Zone_FreightMode" />
- <Param name="@Name_FreightMode" type="FreightMode.Name_FreightMode" sourceColumn="Name_FreightMode" />
- <Param name="@Comment_FreightMode" type="FreightMode.Comment_FreightMode" sourceColumn="Comment_FreightMode" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="UPDATE FreightMode SET ID_Transporter=@ID_Transporter, Zone_FreightMode=@Zone_FreightMode, Name_FreightMode=@Name_FreightMode, Comment_FreightMode=@Comment_FreightMode WHERE ID_FreightMode=@ID_FreightMode">
- <Params>
- <Param name="@ID_FreightMode" type="FreightMode.ID_FreightMode" sourceColumn="ID_FreightMode" />
- <Param name="@ID_Transporter" type="FreightMode.ID_Transporter" sourceColumn="ID_Transporter" />
- <Param name="@Zone_FreightMode" type="FreightMode.Zone_FreightMode" sourceColumn="Zone_FreightMode" />
- <Param name="@Name_FreightMode" type="FreightMode.Name_FreightMode" sourceColumn="Name_FreightMode" />
- <Param name="@Comment_FreightMode" type="FreightMode.Comment_FreightMode" sourceColumn="Comment_FreightMode" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="DELETE FreightMode WHERE ID_FreightMode=@ID_FreightMode">
- <Params>
- <Param name="@ID_FreightMode" type="FreightMode.ID_FreightMode" sourceColumn="ID_FreightMode" />
- </Params>
- </Delete>
- </Table>
- <Table name="AppUser" Type="Reference">
- <GetSchema CmdType="Text" CmdText="SELECT top 0 * FROM AppUser" />
- </Table>
- <Table name="Fax" Type="Association">
- <GetSchema CmdType="Text" CmdText="SELECT top 0 * FROM Fax" />
- <New CmdType="Text" CmdText="INSERT INTO Fax (ID_Fax,ID_Person,Name_Fax,No_Fax,Focus_Fax) VALUES(@ID_Fax,@ID_Person,@Name_Fax,@No_Fax,@Focus_Fax)">
- <Params>
- <Param name="@ID_Fax" type="Fax.ID_Fax" sourceColumn="ID_Fax" />
- <Param name="@ID_Person" type="Fax.ID_Person" sourceColumn="ID_Person" />
- <Param name="@Name_Fax" type="Fax.Name_Fax" sourceColumn="Name_Fax" />
- <Param name="@No_Fax" type="Fax.No_Fax" sourceColumn="No_Fax" />
- <Param name="@Focus_Fax" type="Fax.Focus_Fax" sourceColumn="Focus_Fax" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="UPDATE Fax SET Name_Fax=@Name_Fax,No_Fax=@No_Fax,Focus_Fax=@Focus_Fax WHERE ID_Fax=@ID_Fax">
- <Params>
- <Param name="@ID_Fax" type="Fax.ID_Fax" sourceColumn="ID_Fax" />
- <Param name="@Name_Fax" type="Fax.Name_Fax" sourceColumn="Name_Fax" />
- <Param name="@No_Fax" type="Fax.No_Fax" sourceColumn="No_Fax" />
- <Param name="@Focus_Fax" type="Fax.Focus_Fax" sourceColumn="Focus_Fax" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="DELETE Fax WHERE ID_Fax=@ID_Fax">
- <Params>
- <Param name="@ID_Fax" type="Fax.ID_Fax" sourceColumn="ID_Fax" />
- </Params>
- </Delete>
- <UNIQUEErrorReport ErrorMessage="传真名称或传真号码已经存在!"/>
- </Table>
- <Table name="Telephone" Type="Association">
- <GetSchema CmdType="Text" CmdText="SELECT top 0 * FROM Telephone" />
- <New CmdType="Text" CmdText="INSERT INTO Telephone (ID_Telephone,ID_Person,Name_Telephone,No_Telephone,Focus_Telephone) VALUES(@ID_Telephone,@ID_Person,@Name_Telephone,@No_Telephone,@Focus_Telephone)">
- <Params>
- <Param name="@ID_Telephone" type="Telephone.ID_Telephone" sourceColumn="ID_Telephone" />
- <Param name="@ID_Person" type="Telephone.ID_Person" sourceColumn="ID_Person" />
- <Param name="@Name_Telephone" type="Telephone.Name_Telephone" sourceColumn="Name_Telephone" />
- <Param name="@No_Telephone" type="Telephone.No_Telephone" sourceColumn="No_Telephone" />
- <Param name="@Focus_Telephone" type="Telephone.Focus_Telephone" sourceColumn="Focus_Telephone" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="UPDATE Telephone SET Name_Telephone=@Name_Telephone,No_Telephone=@No_Telephone,Focus_Telephone=@Focus_Telephone WHERE ID_Telephone=@ID_Telephone">
- <Params>
- <Param name="@ID_Telephone" type="Telephone.ID_Telephone" sourceColumn="ID_Telephone" />
- <Param name="@Name_Telephone" type="Telephone.Name_Telephone" sourceColumn="Name_Telephone" />
- <Param name="@No_Telephone" type="Telephone.No_Telephone" sourceColumn="No_Telephone" />
- <Param name="@Focus_Telephone" type="Telephone.Focus_Telephone" sourceColumn="Focus_Telephone" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="DELETE Telephone WHERE ID_Telephone=@ID_Telephone">
- <Params>
- <Param name="@ID_Telephone" type="Telephone.ID_Telephone" sourceColumn="ID_Telephone" />
- </Params>
- </Delete>
- <UNIQUEErrorReport ErrorMessage="电话名称或电话号码已经存在!"/>
- </Table>
- <Table name="TransporterList" Type="Other">
- <GetSchema CmdType="Text" CmdText="SELECT top 0 No_Transporter,ShortName_Transporter From Transporter" />
- </Table>
- </Tables>
- <Search>
- <SearchDefaultPhone CmdType="Text" CmdText="Select newid() as ID_Telephone, CAST('{00000000-0000-0000-0000-000000000000}' AS uniqueidentifier) as ID_Person, CAST(Name_TypeDef AS NVARCHAR(64))As Name_Telephone, CAST(''AS NVARCHAR(128)) As No_Telephone, CAST(0 AS bit) As Focus_Telephone From TypeDef Where Type_TypeDef = 24">
- <Tables>
- <Table name="DefaultTelephone" />
- </Tables>
- </SearchDefaultPhone>
- <SearchDefaultFax CmdType="Text" CmdText="Select newid() as ID_Fax, CAST('{00000000-0000-0000-0000-000000000000}' AS uniqueidentifier) as ID_Person, CAST(Name_TypeDef AS NVARCHAR(64)) As Name_Fax, CAST(''AS NVARCHAR(128)) As No_Fax, CAST(0 AS bit) As Focus_Fax From TypeDef Where Type_TypeDef = 25 order by No_TypeDef">
- <Tables>
- <Table name="DefaultFax" />
- </Tables>
- </SearchDefaultFax>
- <SearchZone CmdType="Text" CmdText="Select Name_TypeDef From TypeDef Where Type_TypeDef = 4">
- <Tables>
- <Table name="Zone" />
- </Tables>
- </SearchZone>
- <SearchName CmdType="Text" CmdText="Select Name_TypeDef From TypeDef Where Type_TypeDef = 5">
- <Tables>
- <Table name="Name" />
- </Tables>
- </SearchName>
- <SearchAllTransporter CmdType="Text" CmdText="SELECT Transporter.* FROM Transporter">
- <Tables>
- <Table name="AllTransporter" />
- </Tables>
- </SearchAllTransporter>
- <SearchTransporterList CmdType="Text" CmdText="SELECT No_Transporter,ShortName_Transporter From Transporter Where SuspendDate_Transporter Is Null">
- <Tables>
- <Table name="TransporterList" />
- </Tables>
- </SearchTransporterList>
- <SearchAllTransporterList CmdType="Text" CmdText="SELECT No_Transporter,ShortName_Transporter From Transporter">
- <Tables>
- <Table name="TransporterList" />
- </Tables>
- </SearchAllTransporterList>
- <SearchTransporterWithNo CmdType="Text" CmdText="DECLARE @ID_Transporter uniqueidentifier
- SELECT Transporter.*, a.Name_User AS CreatorName_Transporter,b.Name_User AS LastModUser_TransporterName
- ,Employee.Name_Employee as MainPrincipal_Transporter,Employee.No_Employee
- FROM Transporter
- Left Join Employee On Employee.ID_Employee=Transporter.ID_Principal
- left join AppUser a on a.ID_User = Transporter.Creator_Transporter
- left join AppUser b on b.ID_User = Transporter.LastModUser_Transporter
- where Transporter.No_Transporter = @No_Transporter
- SELECT @ID_Transporter = Transporter.ID_Transporter FROM Transporter where Transporter.No_Transporter = @No_Transporter
- SELECT * from FreightMode where FreightMode.ID_Transporter = @ID_Transporter
- SELECT * from Telephone where Telephone.ID_Person = @ID_Transporter
- SELECT * from Fax where Fax.ID_Person = @ID_Transporter">
- <Params>
- <Param name="@No_Transporter" type="Transporter.No_Transporter" Index="0" />
- </Params>
- <Tables>
- <Table name="Transporter" />
- <Table name="FreightMode" />
- <Table name="Telephone" />
- <Table name="Fax"/>
- </Tables>
- </SearchTransporterWithNo>
- <SearchTransporterFirst CmdType="Text" CmdText="DECLARE @ID_Transporter uniqueidentifier
- DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_Transporter
- SELECT TOP 1 @NextNo = Transporter.No_Transporter FROM Transporter ORDER BY Transporter.No_Transporter
- SELECT Transporter.*, a.Name_User AS CreatorName_Transporter,b.Name_User AS LastModUser_TransporterName
- ,Employee.Name_Employee as MainPrincipal_Transporter, Employee.No_Employee
- FROM Transporter
- Left Join Employee On Employee.ID_Employee=Transporter.ID_Principal
- left join AppUser a on a.ID_User = Transporter.Creator_Transporter
- left join AppUser b on b.ID_User = Transporter.LastModUser_Transporter
- where Transporter.No_Transporter = @NextNo
- SELECT @ID_Transporter = Transporter.ID_Transporter FROM Transporter where Transporter.No_Transporter = @NextNo
- SELECT * from FreightMode where FreightMode.ID_Transporter = @ID_Transporter
- SELECT * from Telephone where Telephone.ID_Person = @ID_Transporter
- SELECT * from Fax where Fax.ID_Person = @ID_Transporter">
- <Params>
- <Param name="@No_Transporter" type="Transporter.No_Transporter" Index="0" />
- </Params>
- <Tables>
- <Table name="Transporter" />
- <Table name="FreightMode" />
- <Table name="Telephone" />
- <Table name="Fax"/>
- </Tables>
- </SearchTransporterFirst>
- <SearchTransporterPrevious CmdType="Text" CmdText="DECLARE @ID_Transporter uniqueidentifier
- DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_Transporter
- SELECT TOP 1 @NextNo = Transporter.No_Transporter FROM Transporter WHERE Transporter.No_Transporter < @No_Transporter ORDER BY Transporter.No_Transporter Desc
- SELECT Transporter.*, a.Name_User AS CreatorName_Transporter,b.Name_User AS LastModUser_TransporterName
- ,Employee.Name_Employee as MainPrincipal_Transporter, Employee.No_Employee
- FROM Transporter
- Left Join Employee On Employee.ID_Employee=Transporter.ID_Principal
- left join AppUser a on a.ID_User = Transporter.Creator_Transporter
- left join AppUser b on b.ID_User = Transporter.LastModUser_Transporter
- where Transporter.No_Transporter = @NextNo
- SELECT @ID_Transporter = Transporter.ID_Transporter FROM Transporter where Transporter.No_Transporter = @NextNo
- SELECT * from FreightMode where FreightMode.ID_Transporter = @ID_Transporter
- SELECT * from Telephone where Telephone.ID_Person = @ID_Transporter
- SELECT * from Fax where Fax.ID_Person = @ID_Transporter">
- <Params>
- <Param name="@No_Transporter" type="Transporter.No_Transporter" Index="0" />
- </Params>
- <Tables>
- <Table name="Transporter" />
- <Table name="FreightMode" />
- <Table name="Telephone" />
- <Table name="Fax"/>
- </Tables>
- </SearchTransporterPrevious>
- <SearchTransporterNext CmdType="Text" CmdText="DECLARE @ID_Transporter uniqueidentifier
- DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_Transporter
- SELECT TOP 1 @NextNo = Transporter.No_Transporter FROM Transporter WHERE Transporter.No_Transporter > @No_Transporter ORDER BY Transporter.No_Transporter
- SELECT Transporter.*, a.Name_User AS CreatorName_Transporter,b.Name_User AS LastModUser_TransporterName
- ,Employee.Name_Employee as MainPrincipal_Transporter, Employee.No_Employee
- FROM Transporter
- Left Join Employee On Employee.ID_Employee=Transporter.ID_Principal
- left join AppUser a on a.ID_User = Transporter.Creator_Transporter
- left join AppUser b on b.ID_User = Transporter.LastModUser_Transporter
- where Transporter.No_Transporter = @NextNo
- SELECT @ID_Transporter = Transporter.ID_Transporter FROM Transporter where Transporter.No_Transporter = @NextNo
- SELECT * from FreightMode where FreightMode.ID_Transporter = @ID_Transporter
- SELECT * from Telephone where Telephone.ID_Person = @ID_Transporter
- SELECT * from Fax where Fax.ID_Person = @ID_Transporter">
- <Params>
- <Param name="@No_Transporter" type="Transporter.No_Transporter" Index="0" />
- </Params>
- <Tables>
- <Table name="Transporter" />
- <Table name="FreightMode" />
- <Table name="Telephone" />
- <Table name="Fax"/>
- </Tables>
- </SearchTransporterNext>
- <SearchTransporterLast CmdType="Text" CmdText="DECLARE @ID_Transporter uniqueidentifier
- DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_Transporter
- SELECT TOP 1 @NextNo = Transporter.No_Transporter FROM Transporter ORDER BY Transporter.No_Transporter DESC
- SELECT Transporter.*, a.Name_User AS CreatorName_Transporter,b.Name_User AS LastModUser_TransporterName
- ,Employee.Name_Employee as MainPrincipal_Transporter, Employee.No_Employee
- FROM Transporter
- Left Join Employee On Employee.ID_Employee=Transporter.ID_Principal
- left join AppUser a on a.ID_User = Transporter.Creator_Transporter
- left join AppUser b on b.ID_User = Transporter.LastModUser_Transporter
- where Transporter.No_Transporter = @NextNo
- SELECT @ID_Transporter = Transporter.ID_Transporter FROM Transporter where Transporter.No_Transporter = @NextNo
- SELECT * from FreightMode where FreightMode.ID_Transporter = @ID_Transporter
- SELECT * from Telephone where Telephone.ID_Person = @ID_Transporter
- SELECT * from Fax where Fax.ID_Person = @ID_Transporter">
- <Params>
- <Param name="@No_Transporter" type="Transporter.No_Transporter" Index="0" />
- </Params>
- <Tables>
- <Table name="Transporter" />
- <Table name="FreightMode" />
- <Table name="Telephone" />
- <Table name="Fax"/>
- </Tables>
- </SearchTransporterLast>
- <SearchMainPrincipal CmdType="Text" CmdText="SELECT * from Employee order by No_Employee">
- <Tables>
- <Table name="Employee" />
- </Tables>
- </SearchMainPrincipal>
- <!--<SearchTelephone CmdType="Text" CmdText="SELECT * from Telephone where Telephone.ID_Person=@ID_Transporter">
- <Params>
- <Param name="@ID_Transporter" type="Transporter.ID_Transporter" Index="0" />
- </Params>
- <Tables>
- <Table name="Telephone" />
- </Tables>
- </SearchTelephone>
- <SearchFax CmdType="Text" CmdText="SELECT * from Fax where Fax.ID_Person=@ID_Transporter">
- <Params>
- <Param name="@ID_Transporter" type="Fax.ID_Transporter" Index="0" />
- </Params>
- <Tables>
- <Table name="Fax" />
- </Tables>
- </SearchFax>-->
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- NewInstance();
- tbNo.ReadOnly=false;
- txtShortName.ReadOnly=true;
- txtName.ReadOnly=true;
- txtRegistedAddress.ReadOnly=true;
- cbCountry.Enabled=false;
- txtPostalCode.ReadOnly=true;
- cbMainPrincipal.Enabled=false;
- txtLinkman.ReadOnly=true;
- dttCreateDate.ReadOnly=true;
- dtpIsSuspend.Enabled=false;
- txtComment.ReadOnly=true;
- toolBar.EnableSubmit=false;
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnablePrint=false;
- pcPhone.ReadOnly=true;
- pcFax.ReadOnly=true;
- dgFreightMode.ReadOnly=true;
- #Transporter.CreateDate_Transporter=DBNull();
- #Transporter.SuspendDate_Transporter=DBNull();
- #Transporter.LastModUser_Transporter=DBNull();
- #Transporter.LastModDate_Transporter=DBNull();
- if(ckDisplay.Checked)
- #Transporter.IsDisplay=1;
- else
- #Transporter.IsDisplay=0;
- UpdateForm(true, "");
- tbNo.Focus();
- @Status=0;
- </Search>
- <New>
- Empty();
- NewInstance();
- tbNo.ReadOnly=true;
- txtShortName.ReadOnly=false;
- txtName.ReadOnly=false;
- txtRegistedAddress.ReadOnly=false;
- cbCountry.Enabled=true;
- txtPostalCode.ReadOnly=false;
- cbMainPrincipal.Enabled=true;
- txtLinkman.ReadOnly=false;
- dtpIsSuspend.Enabled=true;
- txtComment.ReadOnly=false;
- toolBar.EnableSubmit=GetRight(@Title,"新增");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnablePrint=false;
- dgFreightMode.ReadOnly=false;
- #Transporter.No_Transporter=tbNo.CValue;
- #Transporter.CreatorName_Transporter=GetCurrentUser();<!--得到当前用户。引擎应支持-->
- #Transporter.ID_Transporter=NewGuid();
- #Transporter.Creator_Transporter=GetLoginUserID();
- #Transporter.Country_Transporter=40;
- #Transporter.CreateDate_Transporter=DateTimeNow();
- #Transporter.SuspendDate_Transporter=DBNull();
- #Transporter.LastModUser_Transporter=DBNull();
- #Transporter.LastModDate_Transporter=DBNull();
- Search("SearchDefaultFax");
- Search("SearchDefaultPhone");
- MergeTable("#DefaultFax","#Fax");
- MergeTable("#DefaultTelephone","#Telephone");
- if(ckDisplay.Checked)
- #Transporter.IsDisplay=1;
- else
- #Transporter.IsDisplay=0;
- UpdateForm(true, "");
- pcPhone.ReadOnly=false;
- pcFax.ReadOnly=false;
- txtShortName.Focus();
- @Status=1;
- </New>
- <View>
- tbNo.ReadOnly=false;
- txtShortName.ReadOnly=true;
- txtName.ReadOnly=true;
- txtRegistedAddress.ReadOnly=true;
- cbCountry.Enabled=false;
- txtPostalCode.ReadOnly=true;
- cbMainPrincipal.Enabled=false;
- txtLinkman.ReadOnly=true;
- dtpIsSuspend.Enabled=false;
- txtComment.ReadOnly=true;
- toolBar.EnableSubmit=false;
- toolBar.EnableModify=GetRight(@Title,"修改");
- toolBar.EnableDelete=GetRight(@Title,"删除");
- toolBar.EnablePrint=GetRight(@Title,"打印");
- pcPhone.ReadOnly=true;
- pcFax.ReadOnly=true;
- dgFreightMode.ReadOnly=true;
- if(ckDisplay.Checked)
- #Transporter.IsDisplay=1;
- else
- #Transporter.IsDisplay=0;
- UpdateForm(true, "");
- @Status=2;
- </View>
- <Modify>
- tbNo.ReadOnly=true;
- txtShortName.ReadOnly=false;
- txtName.ReadOnly=false;
- txtRegistedAddress.ReadOnly=false;
- cbCountry.Enabled=true;
- txtPostalCode.ReadOnly=false;
- cbMainPrincipal.Enabled=true;
- txtLinkman.ReadOnly=false;
- dtpIsSuspend.Enabled=true;
- txtComment.ReadOnly=false;
- toolBar.EnableSubmit=GetRight(@Title,"新增");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=GetRight(@Title,"删除");
- toolBar.EnablePrint=false;
- pcPhone.ReadOnly=false;
- pcFax.ReadOnly=false;
- dgFreightMode.ReadOnly=false;
- #Transporter.LastModUser_TransporterName=GetCurrentUser();
- #Transporter.LastModUser_Transporter=GetLoginUserID();
- #Transporter.LastModDate_Transporter=DateTimeNow();
- if(ckDisplay.Checked)
- #Transporter.IsDisplay=1;
- else
- #Transporter.IsDisplay=0;
- UpdateForm(true, "");
- txtShortName.Focus();
- @Status=3;
- </Modify>
- <SubmitButtonClick>
- <![CDATA[
- if(txtShortName.CValue=="")
- {
- MessageBox("请输入运输商简称!",@Title);
- txtShortName.Focus();
- return;
- }
- if(txtName.CValue=="")
- {
- MessageBox("请输入运输商名称!",@Title);
- txtName.Focus();
- return;
- }
- if(cbCountry.CValue==0)
- {
- tbDetail.SelectedIndex=0;
- MessageBox("请输入国家名称!",@Title);
- cbCountry.Focus();
- return;
- }
- if(!cbMainPrincipal.CheckSelectedItem())
- {
- MessageBox("请选择有效的主要负责人!",@Title);
- tbDetail.SelectedIndex = 0;
- cbMainPrincipal.Focus();
- return;
- }
- UpdateForm(false, "");
- if(@Status==1)
- {
- SuspendLayout();
- for(@i=RowCount("#FreightMode")-1;@i>=0;@i=@i-1)
- {
- SetPosition("#FreightMode", @i);
- if(Equals(#FreightMode.ID_FreightMode,GuidEmpty()))
- #FreightMode.ID_FreightMode = NewGuid();
- #FreightMode.ID_Transporter = #Transporter.ID_Transporter;
- }
- for(@i=RowCount("#Telephone")-1;@i>=0;@i=@i-1)
- {
- SetPosition("#Telephone",@i);
- if(Equals(#Telephone.ID_Telephone,GuidEmpty()))
- #Telephone.ID_Telephone=NewGuid();
- #Telephone.ID_Person=#Transporter.ID_Transporter;
- }
- for(@i=RowCount("#Fax")-1;@i>=0;@i=@i-1)
- {
- SetPosition("#Fax",@i);
- if(Equals(#Fax.ID_Fax,GuidEmpty()))
- #Fax.ID_Fax=NewGuid();
- #Fax.ID_Person=#Transporter.ID_Transporter;
- }
- ResumeLayout();
- New();
- }
- else if(@Status == 3)
- {
- SuspendLayout();
- for(@i=RowCount("#FreightMode")-1;@i>=0;@i=@i-1)
- {
- SetPosition("#FreightMode", @i);
- if(Equals(#FreightMode.ID_FreightMode,GuidEmpty()))
- #FreightMode.ID_FreightMode = NewGuid();
- #FreightMode.ID_Transporter = #Transporter.ID_Transporter;
- }
- for(@i=RowCount("#Telephone")-1;@i>=0;@i=@i-1)
- {
- SetPosition("#Telephone",@i);
- if(Equals(#Telephone.ID_Telephone,GuidEmpty()))
- #Telephone.ID_Telephone=NewGuid();
- #Telephone.ID_Person=#Transporter.ID_Transporter;
- }
- for(@i=RowCount("#Fax")-1;@i>=0;@i=@i-1)
- {
- SetPosition("#Fax",@i);
- if(Equals(#Fax.ID_Fax,GuidEmpty()))
- #Fax.ID_Fax=NewGuid();
- #Fax.ID_Person=#Transporter.ID_Transporter;
- }
- ResumeLayout();
- #Transporter.LastModDate_Transporter=DateTimeNow();
- Update();
- }
- ChangeMode("View");
- ]]>
- </SubmitButtonClick>
- </Lables>
- </Form>
- </Forms>
|