12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175 |
- <?xml version="1.0" encoding="utf-8" ?>
- <Forms>
- <Form Name="FrmCustomerMaintain">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @Title="客户资料维护";
- GetSchema();
- ChangeMode("Search");
- dgInvoice.NoMember="No_CustomerLathe";
- ]]>
- </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>
- <IKDateTimePicker name="dtpDate" DataSource="CustomerInfo.Date_CustomerInfo"/>
- <IKTextButton name="tbNo" DataSource="CustomerInfo.No_CustomerInfo">
- <Events>
- <Enter>
- <![CDATA[
- if(tbNo.ReadOnly == false)
- {
- if(tbNo.CValue != StringEmpty())
- {
- UpdateForm(false, "");
- if(Search("SearchCustomerInfoWithNo", tbNo.CValue))
- {
- ChangeMode("View");
- }
- else
- {
- MessageBox(该编号不存在!);
- }
- }
- else
- {
- MessageBox("请输入客户编号!",@Title);
- }
- }
- ]]>
- </Enter>
- <Click>
- @Temp = ShowSearchBox("CustomerInfoSearch","INFOMATION",tbNo.CValue);
- if(@Temp != StringEmpty())
- {
- tbNo.CValue = @Temp;
- UpdateForm(false, "");
- if(Search("SearchCustomerInfoWithNo",tbNo.CValue))
- {
- ChangeMode("View");
- }
- }
- </Click>
- </Events>
- </IKTextButton>
- <IKTextButton name="tbCustomerNo" DataSource="CustomerInfo.No_Customer">
- <Events>
- <Enter>
- <![CDATA[
- if (tbCustomerNo.ReadOnly == false)
- {
- UpdateForm(false, "");
- if (tbCustomerNo.CValue == "" || !Search("SearchCustomerWithNo", tbCustomerNo.CValue))
- {
- if (tbCustomerNo.CValue == "")
- {
- MessageBox("请输入客户编号!", @Title);
- }
- else
- {
- MessageBox("该客户不存在!",@Title);
- @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo.CValue);
- if(@temp != "")
- {
- tbCustomerNo.CValue = @temp;
- ActiveControlEvent("tbCustomerNo", "Enter");
- }
- }
- }
- else
- {
- if (!Equals(#Customer.SuspendDate_Customer,DBNull()))
- {
- MessageBox("该客户被暂停,不能销货!",@Title);
- tbCustomerNo.Focus();
- return;
- }
-
- #CustomerInfo.ID_Customer = #Customer.ID_Customer;
-
- #CustomerInfo.Name_Customer = #Customer.Name_Customer;
- #CustomerInfo.ShortName_Customer = #Customer.ShortName_Customer;
-
-
-
- }
- UpdateForm(true, "");
- }
- ]]>
- </Enter>
- <Click>
- <![CDATA[
- if (tbCustomerNo.ReadOnly == false)
- {
- @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo.CValue);
- if( @temp == "" )
- return;
- tbCustomerNo.CValue = @temp;
- ActiveControlEvent("tbCustomerNo", "Enter");
- }
- ]]>
- </Click>
- </Events>
- </IKTextButton>
- <IKTextBox name="txtCustomerShortName" DataSource="CustomerInfo.ShortName_Customer"/>
- <IKTextBox name="txtCustomerName" DataSource="CustomerInfo.Name_Customer"/>
- <IKTextBox name="txtPrincipal" DataSource="CustomerInfo.Principal_CustomerInfo"/>
- <IKTextBox name="txtPurchaser" DataSource="CustomerInfo.Purchase_CustomerInfo"/>
- <IKTextBox name="txtLinkman" DataSource="CustomerInfo.Linkman_CustomerInfo"/>
- <IKTextBox name="txtTele" DataSource="CustomerInfo.Tel_CustomerInfo"/>
- <IKTextBox name="txtFax" DataSource="CustomerInfo.Fax_CustomerInfo"/>
- <IKTextBox name="txtSendAddr" DataSource="CustomerInfo.SendAddr_CustomerInfo"/>
- <IKTextBox name="txtInvoiceAdress" DataSource="CustomerInfo.InvoiceAddr_CustomerInfo"/>
- <IKTextBox name="txtCreator" DataSource="CustomerInfo.CreatorName_CustomerInfo"/>
- <IKDateTimeText name="dtCreateDate" DataSource="CustomerInfo.CreateDate_CustomerInfo"/>
- <IKTextBox name="txtLastModUser" DataSource="CustomerInfo.LastModUser"/>
- <IKDateTimeText name="dtLastModDate" DataSource="CustomerInfo.LastModDate_CustomerInfo"/>
- <IKTextBox name="txtBeginYear" DataSource="CustomerInfo.FromDate_CustomerInfo"/>
- <IKTextBox name="txtEmplNum" DataSource="CustomerInfo.Member_CustomerInfo"/>
- <IKTextBox name="txtAccountLastYear" DataSource="CustomerInfo.LastTurnover_CustomerInfo"/>
- <IKTextBox name="txtAccountThisYear" DataSource="CustomerInfo.Turnover_CustomerInfo"/>
- <IKCheckBox name="ckProduct" DataSource="CustomerInfo.IsProduct_CustomerInfo">
- <Events>
- <CheckedChanged>
- if(ckProduct.Checked)
- #CustomerInfo.IsProduct_CustomerInfo = 1;
- else
- #CustomerInfo.IsProduct_CustomerInfo = 0;
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <IKCheckBox name="ckSpecial" DataSource="CustomerInfo.IsSpecial_CustomerInfo">
- <Events>
- <CheckedChanged>
- if(ckSpecial.Checked)
- #CustomerInfo.IsSpecial_CustomerInfo = 1;
- else
- #CustomerInfo.IsSpecial_CustomerInfo = 0;
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <IKCheckBox name="ckNormal" DataSource="CustomerInfo.IsNormal_CustomerInfo">
- <Events>
- <CheckedChanged>
- if(ckNormal.Checked)
- #CustomerInfo.IsNormal_CustomerInfo = 1;
- else
- #CustomerInfo.IsNormal_CustomerInfo = 0;
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <IKCheckBox name="ikCheckBox1" DataSource="CustomerInfo.IsAgent_CustomerInfo">
- <Events>
- <CheckedChanged>
- if(ikCheckBox1.Checked)
- #CustomerInfo.IsAgent_CustomerInfo = 1;
- else
- #CustomerInfo.IsAgent_CustomerInfo = 0;
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <IKCheckBox name="ikCheckBox2" DataSource="CustomerInfo.IsDealer_CustomerInfo">
- <Events>
- <CheckedChanged>
- if(ikCheckBox2.Checked)
- #CustomerInfo.IsDealer_CustomerInfo = 1;
- else
- #CustomerInfo.IsDealer_CustomerInfo = 0;
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <IKCheckBox name="ikCheckBox3" DataSource="CustomerInfo.IsTooldealer_CustomerInfo">
- <Events>
- <CheckedChanged>
- if(ikCheckBox3.Checked)
- #CustomerInfo.IsTooldealer_CustomerInfo = 1;
- else
- #CustomerInfo.IsTooldealer_CustomerInfo = 0;
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <IKCheckBox name="ikCheckBox5" DataSource="CustomerInfo.IsToolAgent_CustomerInfo">
- <Events>
- <CheckedChanged>
- if(ikCheckBox5.Checked)
- #CustomerInfo.IsToolAgent_CustomerInfo = 1;
- else
- #CustomerInfo.IsToolAgent_CustomerInfo = 0;
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <IKCheckBox name="ikCheckBox6" DataSource="CustomerInfo.IsDotask_CustomerInfo">
- <Events>
- <CheckedChanged>
- if(ikCheckBox6.Checked)
- #CustomerInfo.IsDotask_CustomerInfo = 1;
- else
- #CustomerInfo.IsDotask_CustomerInfo = 0;
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <IKDataGridEx name="dgInvoice" DataSource="CustomerLathe" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="CustomerLathe.No_CustomerLathe" />
- <DataColumn Index="1" DataSource="CustomerLathe.LatheType_CustomerLathe" >
- <IKDataGridComboBoxColumn DisplaySourceEx="CustomerLathe.LatheType_CustomerLathe" ValueSourceEx="CustomerLathe.LatheType_CustomerLathe" DataSourceEx="LatheType" DisplayMemberEx="Name_TypeDef" ValueMemberEx="Name_TypeDef">
- <Events>
- <Reload>
- Search("SearchLatheType");
- SetDataGridColumnDataSource(1,"dgInvoice");
- </Reload>
- </Events>
- </IKDataGridComboBoxColumn>
- </DataColumn>
- <DataColumn Index="2" DataSource="CustomerLathe.Manufacturer_CustomerLathe" />
- <DataColumn Index="3" DataSource="CustomerLathe.Type_CustomerLathe" />
- <DataColumn Index="4" DataSource="CustomerLathe.Quantity_CustomerLathe" />
- </IKDataGridEx>
- <IKButton name="btnAdd">
- <Events>
- <Click>
- #CustomerInfo.ProductType_CustomerInfo = "";
- if(ckType1.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType1.Text + ";";
- if(ckType2.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType2.Text + ";";
- if(ckType3.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType3.Text + ";";
- if(ckType4.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType4.Text + ";";
- if(ckType5.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType5.Text + ";";
- if(ckType6.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType6.Text + ";";
- if(ckType7.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType7.Text + ";";
- if(ckType8.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType8.Text + ";";
- if(ckType9.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType9.Text + ";";
- if(ckType10.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType10.Text + ";";
- if(ckType11.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType11.Text + ";";
- if(ckType12.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType12.Text + ";";
- if(ckType13.Checked)
- #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType13.Text + ";";
- UpdateForm(true,"txtProductType");
- </Click>
- </Events>
- </IKButton>
- <IKTextBox name="txtProductType" DataSource="CustomerInfo.ProductType_CustomerInfo"/>
- <IKTextBox name="txtSY" DataSource="CustomerInfo.Upriver_CustomerInfo"/>
- <IKTextBox name="txtWX" DataSource="CustomerInfo.Satellite_CustomerInfo"/>
- <IKDataGridEx name="dgCurrentQuestion" DataSource="CustomerQuestion" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="CustomerQuestion.Comment_CustomerQuestion" />
- </IKDataGridEx>
- <IKDataGridEx name="dgOtherQuestion" DataSource="CustomerSuggestion" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="CustomerSuggestion.Comment_CustomerSuggestion" />
- </IKDataGridEx>
- <IKFormToolBar name="toolBar">
- <Events>
- <ClickFirst>
- if(Search("SearchCustomerInfoFirst",tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickFirst>
- <ClickPrev>
- if(Search("SearchCustomerInfoPrevious",tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickPrev>
- <ClickNext>
- if(Search("SearchCustomerInfoNext",tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickNext>
- <ClickLast>
- if(Search("SearchCustomerInfoLast",tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickLast>
- <ClickNew>
- <![CDATA[
- @NextNo = GetNextAutoNumber(true);
- if (!Equals(@NextNo, ""))
- {
- ChangeMode("New");
- #CustomerInfo.No_CustomerInfo = @NextNo;
- UpdateForm(true, "tbNo");
- }
- ]]>
- </ClickNew>
- <ClickEmpty>
- ChangeMode("Search");
- </ClickEmpty>
- <ClickSubmit>
- <Lable name="SubmitButtonClick" />
- </ClickSubmit>
- <ClickModify>
- ChangeMode("Modify");
- </ClickModify>
- <ClickDelete>
- Delete(); ChangeMode("Search");
- </ClickDelete>
- <ClickPrint>
- PrintReport();
- </ClickPrint>
- <ClickAudit>
- ;
- </ClickAudit>
- <ClickUnAudit>
- ;
- </ClickUnAudit>
- <ClickImport>
- ;
- </ClickImport>
- <ClickExport>
- ;
- </ClickExport>
- <ClickClose>
- ;
- </ClickClose>
- <ClickExpand>
- ;
- </ClickExpand>
- </Events>
- </IKFormToolBar>
- </Controls>
- <LockInfomation LockID="ID_CustomerInfo" LockNO="No_CustomerInfo" LockSearchFunction="SearchCustomerInfoWithNo"/>
- <ChildForms>
- <ChildForm name="CustomerSearch" DataSource="Customer" SearchFunction="SearchAllCustomer" SearchFunctionCondition="SearchCustomerCondition" SearchFunctionByNo="" MappingName="客户">
- <DataColumn Index="0" MappingName="#Customer.No_Customer" HeaderText="客户编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#Customer.ShortName_Customer" HeaderText="客户简称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="2" MappingName="#Customer.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="3" MappingName="#Customer.Level_Customer" HeaderText="客户等级" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="4" MappingName="#Customer.IsGeneric_Customer" HeaderText="一般客户" Width="75" ColumnType="IKDataGridBoolColumn"/>
- <DataColumn Index="5" MappingName="#Customer.Zone_Customer" HeaderText="地区" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="6" MappingName="#Customer.SendAddr_Customer" HeaderText="送货地址" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="7" MappingName="#Customer.Name_Linkman" HeaderText="主要联系人" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="8" MappingName="#Customer.No_Telephone" HeaderText="客户电话" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="9" MappingName="#Customer.No_Fax" HeaderText="传真" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="CustomerInfo" Type="Parent">
- <GetSchema CmdType="Text" CmdText="Select Top 0 CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
- No_Customer,ShortName_Customer,Name_Customer
- From CustomerInfo
- LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
- LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
- LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer"/>
- <New CmdType="Text" CmdText="Insert Into CustomerInfo (ID_CustomerInfo, No_CustomerInfo, Date_CustomerInfo, ID_Customer, Principal_CustomerInfo, Purchase_CustomerInfo, Linkman_CustomerInfo, Tel_CustomerInfo, Fax_CustomerInfo, SendAddr_CustomerInfo, InvoiceAddr_CustomerInfo, FromDate_CustomerInfo, Member_CustomerInfo, LastTurnover_CustomerInfo, Turnover_CustomerInfo, ProductType_CustomerInfo, Upriver_CustomerInfo, Satellite_CustomerInfo,ID_Creator,CreateDate_CustomerInfo,LastModDate_CustomerInfo,LastModUser_CustomerInfo, IsProduct_CustomerInfo, IsSpecial_CustomerInfo, IsNormal_CustomerInfo,IsAgent_CustomerInfo,IsDealer_CustomerInfo,IsTooldealer_CustomerInfo,IsToolAgent_CustomerInfo,IsDotask_CustomerInfo)
- Values (@ID_CustomerInfo, @No_CustomerInfo, @Date_CustomerInfo, @ID_Customer, @Principal_CustomerInfo, @Purchase_CustomerInfo, @Linkman_CustomerInfo, @Tel_CustomerInfo, @Fax_CustomerInfo, @SendAddr_CustomerInfo, @InvoiceAddr_CustomerInfo, @FromDate_CustomerInfo, @Member_CustomerInfo, @LastTurnover_CustomerInfo, @Turnover_CustomerInfo, @ProductType_CustomerInfo, @Upriver_CustomerInfo, @Satellite_CustomerInfo,@ID_Creator,@CreateDate_CustomerInfo,@LastModDate_CustomerInfo,@LastModUser_CustomerInfo, @IsProduct_CustomerInfo, @IsSpecial_CustomerInfo, @IsNormal_CustomerInfo,@IsAgent_CustomerInfo,@IsDealer_CustomerInfo,@IsTooldealer_CustomerInfo,@IsToolAgent_CustomerInfo,@IsDotask_CustomerInfo)">
- <Params>
- <Param name="@ID_CustomerInfo" type="CustomerInfo.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
- <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
- <Param name="@Date_CustomerInfo" type="CustomerInfo.Date_CustomerInfo" sourceColumn="Date_CustomerInfo" />
- <Param name="@ID_Customer" type="CustomerInfo.ID_Customer" sourceColumn="ID_Customer" />
- <Param name="@Principal_CustomerInfo" type="CustomerInfo.Principal_CustomerInfo" sourceColumn="Principal_CustomerInfo" />
- <Param name="@Purchase_CustomerInfo" type="CustomerInfo.Purchase_CustomerInfo" sourceColumn="Purchase_CustomerInfo" />
- <Param name="@Linkman_CustomerInfo" type="CustomerInfo.Linkman_CustomerInfo" sourceColumn="Linkman_CustomerInfo" />
- <Param name="@Tel_CustomerInfo" type="CustomerInfo.Tel_CustomerInfo" sourceColumn="Tel_CustomerInfo" />
- <Param name="@Fax_CustomerInfo" type="CustomerInfo.Fax_CustomerInfo" sourceColumn="Fax_CustomerInfo" />
- <Param name="@SendAddr_CustomerInfo" type="CustomerInfo.SendAddr_CustomerInfo" sourceColumn="SendAddr_CustomerInfo" />
- <Param name="@InvoiceAddr_CustomerInfo" type="CustomerInfo.InvoiceAddr_CustomerInfo" sourceColumn="InvoiceAddr_CustomerInfo" />
- <Param name="@FromDate_CustomerInfo" type="CustomerInfo.FromDate_CustomerInfo" sourceColumn="FromDate_CustomerInfo" />
- <Param name="@Member_CustomerInfo" type="CustomerInfo.Member_CustomerInfo" sourceColumn="Member_CustomerInfo" />
- <Param name="@LastTurnover_CustomerInfo" type="CustomerInfo.LastTurnover_CustomerInfo" sourceColumn="LastTurnover_CustomerInfo" />
- <Param name="@Turnover_CustomerInfo" type="CustomerInfo.Turnover_CustomerInfo" sourceColumn="Turnover_CustomerInfo" />
- <Param name="@ProductType_CustomerInfo" type="CustomerInfo.ProductType_CustomerInfo" sourceColumn="ProductType_CustomerInfo" />
- <Param name="@Upriver_CustomerInfo" type="CustomerInfo.Upriver_CustomerInfo" sourceColumn="Upriver_CustomerInfo" />
- <Param name="@Satellite_CustomerInfo" type="CustomerInfo.Satellite_CustomerInfo" sourceColumn="Satellite_CustomerInfo" />
- <Param name="@ID_Creator" type="CustomerInfo.ID_Creator" sourceColumn="ID_Creator" />
- <Param name="@CreateDate_CustomerInfo" type="CustomerInfo.CreateDate_CustomerInfo" sourceColumn="CreateDate_CustomerInfo" />
- <Param name="@LastModDate_CustomerInfo" type="CustomerInfo.LastModDate_CustomerInfo" sourceColumn="LastModDate_CustomerInfo" />
- <Param name="@LastModUser_CustomerInfo" type="CustomerInfo.LastModUser_CustomerInfo" sourceColumn="LastModUser_CustomerInfo" />
- <Param name="@IsProduct_CustomerInfo" type="CustomerInfo.IsProduct_CustomerInfo" sourceColumn="IsProduct_CustomerInfo" />
- <Param name="@IsSpecial_CustomerInfo" type="CustomerInfo.IsSpecial_CustomerInfo" sourceColumn="IsSpecial_CustomerInfo" />
- <Param name="@IsNormal_CustomerInfo" type="CustomerInfo.IsNormal_CustomerInfo" sourceColumn="IsNormal_CustomerInfo" />
- <Param name="@IsAgent_CustomerInfo" type="CustomerInfo.IsAgent_CustomerInfo" sourceColumn="IsAgent_CustomerInfo" />
- <Param name="@IsDealer_CustomerInfo" type="CustomerInfo.IsDealer_CustomerInfo" sourceColumn="IsDealer_CustomerInfo" />
- <Param name="@IsTooldealer_CustomerInfo" type="CustomerInfo.IsTooldealer_CustomerInfo" sourceColumn="IsTooldealer_CustomerInfo" />
- <Param name="@IsToolAgent_CustomerInfo" type="CustomerInfo.IsToolAgent_CustomerInfo" sourceColumn="IsToolAgent_CustomerInfo" />
- <Param name="@IsDotask_CustomerInfo" type="CustomerInfo.IsDotask_CustomerInfo" sourceColumn="IsDotask_CustomerInfo" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="Update dbo.CustomerInfo
- Set No_CustomerInfo = @No_CustomerInfo,
- Date_CustomerInfo = @Date_CustomerInfo,
- ID_Customer = @ID_Customer,
- Principal_CustomerInfo = @Principal_CustomerInfo,
- Purchase_CustomerInfo = @Purchase_CustomerInfo,
- Linkman_CustomerInfo = @Linkman_CustomerInfo,
- Tel_CustomerInfo = @Tel_CustomerInfo,
- Fax_CustomerInfo = @Fax_CustomerInfo,
- SendAddr_CustomerInfo = @SendAddr_CustomerInfo,
- InvoiceAddr_CustomerInfo = @InvoiceAddr_CustomerInfo,
- FromDate_CustomerInfo = @FromDate_CustomerInfo,
- Member_CustomerInfo = @Member_CustomerInfo,
- LastTurnover_CustomerInfo = @LastTurnover_CustomerInfo,
- Turnover_CustomerInfo = @Turnover_CustomerInfo,
- ProductType_CustomerInfo = @ProductType_CustomerInfo,
- Upriver_CustomerInfo = @Upriver_CustomerInfo,
- Satellite_CustomerInfo = @Satellite_CustomerInfo,
- ID_Creator = @ID_Creator,
- CreateDate_CustomerInfo = @CreateDate_CustomerInfo,
- LastModDate_CustomerInfo = @LastModDate_CustomerInfo,
- LastModUser_CustomerInfo = @LastModUser_CustomerInfo,
- IsProduct_CustomerInfo = @IsProduct_CustomerInfo,
- IsSpecial_CustomerInfo = @IsSpecial_CustomerInfo,
- IsNormal_CustomerInfo = @IsNormal_CustomerInfo,
- IsAgent_CustomerInfo = @IsAgent_CustomerInfo,
- IsDealer_CustomerInfo = @IsDealer_CustomerInfo,
- IsTooldealer_CustomerInfo = @IsTooldealer_CustomerInfo,
- IsToolAgent_CustomerInfo = @IsToolAgent_CustomerInfo,
- IsDotask_CustomerInfo = @IsDotask_CustomerInfo
- Where ID_CustomerInfo = @ID_CustomerInfo">
- <Params>
- <Param name="@ID_CustomerInfo" type="CustomerInfo.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
- <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
- <Param name="@Date_CustomerInfo" type="CustomerInfo.Date_CustomerInfo" sourceColumn="Date_CustomerInfo" />
- <Param name="@ID_Customer" type="CustomerInfo.ID_Customer" sourceColumn="ID_Customer" />
- <Param name="@Principal_CustomerInfo" type="CustomerInfo.Principal_CustomerInfo" sourceColumn="Principal_CustomerInfo" />
- <Param name="@Purchase_CustomerInfo" type="CustomerInfo.Purchase_CustomerInfo" sourceColumn="Purchase_CustomerInfo" />
- <Param name="@Linkman_CustomerInfo" type="CustomerInfo.Linkman_CustomerInfo" sourceColumn="Linkman_CustomerInfo" />
- <Param name="@Tel_CustomerInfo" type="CustomerInfo.Tel_CustomerInfo" sourceColumn="Tel_CustomerInfo" />
- <Param name="@Fax_CustomerInfo" type="CustomerInfo.Fax_CustomerInfo" sourceColumn="Fax_CustomerInfo" />
- <Param name="@SendAddr_CustomerInfo" type="CustomerInfo.SendAddr_CustomerInfo" sourceColumn="SendAddr_CustomerInfo" />
- <Param name="@InvoiceAddr_CustomerInfo" type="CustomerInfo.InvoiceAddr_CustomerInfo" sourceColumn="InvoiceAddr_CustomerInfo" />
- <Param name="@FromDate_CustomerInfo" type="CustomerInfo.FromDate_CustomerInfo" sourceColumn="FromDate_CustomerInfo" />
- <Param name="@Member_CustomerInfo" type="CustomerInfo.Member_CustomerInfo" sourceColumn="Member_CustomerInfo" />
- <Param name="@LastTurnover_CustomerInfo" type="CustomerInfo.LastTurnover_CustomerInfo" sourceColumn="LastTurnover_CustomerInfo" />
- <Param name="@Turnover_CustomerInfo" type="CustomerInfo.Turnover_CustomerInfo" sourceColumn="Turnover_CustomerInfo" />
- <Param name="@ProductType_CustomerInfo" type="CustomerInfo.ProductType_CustomerInfo" sourceColumn="ProductType_CustomerInfo" />
- <Param name="@Upriver_CustomerInfo" type="CustomerInfo.Upriver_CustomerInfo" sourceColumn="Upriver_CustomerInfo" />
- <Param name="@Satellite_CustomerInfo" type="CustomerInfo.Satellite_CustomerInfo" sourceColumn="Satellite_CustomerInfo" />
- <Param name="@ID_Creator" type="CustomerInfo.ID_Creator" sourceColumn="ID_Creator" />
- <Param name="@CreateDate_CustomerInfo" type="CustomerInfo.CreateDate_CustomerInfo" sourceColumn="CreateDate_CustomerInfo" />
- <Param name="@LastModDate_CustomerInfo" type="CustomerInfo.LastModDate_CustomerInfo" sourceColumn="LastModDate_CustomerInfo" />
- <Param name="@LastModUser_CustomerInfo" type="CustomerInfo.LastModUser_CustomerInfo" sourceColumn="LastModUser_CustomerInfo" />
- <Param name="@IsProduct_CustomerInfo" type="CustomerInfo.IsProduct_CustomerInfo" sourceColumn="IsProduct_CustomerInfo" />
- <Param name="@IsSpecial_CustomerInfo" type="CustomerInfo.IsSpecial_CustomerInfo" sourceColumn="IsSpecial_CustomerInfo" />
- <Param name="@IsNormal_CustomerInfo" type="CustomerInfo.IsNormal_CustomerInfo" sourceColumn="IsNormal_CustomerInfo" />
- <Param name="@IsAgent_CustomerInfo" type="CustomerInfo.IsAgent_CustomerInfo" sourceColumn="IsAgent_CustomerInfo" />
- <Param name="@IsDealer_CustomerInfo" type="CustomerInfo.IsDealer_CustomerInfo" sourceColumn="IsDealer_CustomerInfo" />
- <Param name="@IsTooldealer_CustomerInfo" type="CustomerInfo.IsTooldealer_CustomerInfo" sourceColumn="IsTooldealer_CustomerInfo" />
- <Param name="@IsToolAgent_CustomerInfo" type="CustomerInfo.IsToolAgent_CustomerInfo" sourceColumn="IsToolAgent_CustomerInfo" />
- <Param name="@IsDotask_CustomerInfo" type="CustomerInfo.IsDotask_CustomerInfo" sourceColumn="IsDotask_CustomerInfo" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="Delete CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
- Delete CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
- Delete CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo
- Delete CustomerInfo Where ID_CustomerInfo = @ID_CustomerInfo">
- <Params>
- <Param name="@ID_CustomerInfo" type="CustomerInfo.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
- </Params>
- </Delete>
- <FKErrorReport ErrorMessage="该客户已被引用,删除失败!"/>
- <UNIQUEErrorReport ErrorMessage="该建档编号已存在,提交失败!"/>
- </Table>
- <Table name="CustomerLathe" Type="Child">
- <GetSchema CmdType="Text" CmdText="Select Top 0 dbo.CustomerLathe.* From dbo.CustomerLathe"/>
- <New CmdType="Text" CmdText="Insert Into dbo.CustomerLathe (ID_CustomerLathe, ID_CustomerInfo, No_CustomerLathe, LatheType_CustomerLathe, Manufacturer_CustomerLathe, Type_CustomerLathe, Quantity_CustomerLathe)
- Values (@ID_CustomerLathe, @ID_CustomerInfo, @No_CustomerLathe, @LatheType_CustomerLathe, @Manufacturer_CustomerLathe, @Type_CustomerLathe, @Quantity_CustomerLathe)">
- <Params>
- <Param name="@ID_CustomerLathe" type="CustomerLathe.ID_CustomerLathe" sourceColumn="ID_CustomerLathe" />
- <Param name="@ID_CustomerInfo" type="CustomerLathe.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
- <Param name="@No_CustomerLathe" type="CustomerLathe.No_CustomerLathe" sourceColumn="No_CustomerLathe" />
- <Param name="@LatheType_CustomerLathe" type="CustomerLathe.LatheType_CustomerLathe" sourceColumn="LatheType_CustomerLathe" />
- <Param name="@Manufacturer_CustomerLathe" type="CustomerLathe.Manufacturer_CustomerLathe" sourceColumn="Manufacturer_CustomerLathe" />
- <Param name="@Type_CustomerLathe" type="CustomerLathe.Type_CustomerLathe" sourceColumn="Type_CustomerLathe" />
- <Param name="@Quantity_CustomerLathe" type="CustomerLathe.Quantity_CustomerLathe" sourceColumn="Quantity_CustomerLathe" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="Update dbo.CustomerLathe
- Set ID_CustomerInfo = @ID_CustomerInfo,
- No_CustomerLathe = @No_CustomerLathe,
- LatheType_CustomerLathe = @LatheType_CustomerLathe,
- Manufacturer_CustomerLathe = @Manufacturer_CustomerLathe,
- Type_CustomerLathe = @Type_CustomerLathe,
- Quantity_CustomerLathe = @Quantity_CustomerLathe
- Where ID_CustomerLathe = @ID_CustomerLathe">
- <Params>
- <Param name="@ID_CustomerLathe" type="CustomerLathe.ID_CustomerLathe" sourceColumn="ID_CustomerLathe" />
- <Param name="@ID_CustomerInfo" type="CustomerLathe.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
- <Param name="@No_CustomerLathe" type="CustomerLathe.No_CustomerLathe" sourceColumn="No_CustomerLathe" />
- <Param name="@LatheType_CustomerLathe" type="CustomerLathe.LatheType_CustomerLathe" sourceColumn="LatheType_CustomerLathe" />
- <Param name="@Manufacturer_CustomerLathe" type="CustomerLathe.Manufacturer_CustomerLathe" sourceColumn="Manufacturer_CustomerLathe" />
- <Param name="@Type_CustomerLathe" type="CustomerLathe.Type_CustomerLathe" sourceColumn="Type_CustomerLathe" />
- <Param name="@Quantity_CustomerLathe" type="CustomerLathe.Quantity_CustomerLathe" sourceColumn="Quantity_CustomerLathe" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="Delete CustomerLathe Where ID_CustomerLathe = @ID_CustomerLathe">
- <Params>
- <Param name="@ID_CustomerLathe" type="CustomerLathe.ID_CustomerInfo" sourceColumn="ID_CustomerLathe" />
- </Params>
- </Delete>
- </Table>
- <Table name="CustomerQuestion" Type="Child">
- <GetSchema CmdType="Text" CmdText="Select Top 0 CustomerQuestion.* From CustomerQuestion"/>
- <New CmdType="Text" CmdText="Insert Into dbo.CustomerQuestion (ID_CustomerQuestion, ID_CustomerInfo, Comment_CustomerQuestion)
- Values (@ID_CustomerQuestion, @ID_CustomerInfo, @Comment_CustomerQuestion)">
- <Params>
- <Param name="@ID_CustomerQuestion" type="CustomerQuestion.ID_CustomerQuestion" sourceColumn="ID_CustomerQuestion" />
- <Param name="@ID_CustomerInfo" type="CustomerQuestion.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
- <Param name="@Comment_CustomerQuestion" type="CustomerQuestion.Comment_CustomerQuestion" sourceColumn="Comment_CustomerQuestion" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="Update dbo.CustomerQuestion
- Set ID_CustomerInfo = @ID_CustomerInfo,
- Comment_CustomerQuestion = @Comment_CustomerQuestion
- Where ID_CustomerQuestion = @ID_CustomerQuestion">
- <Params>
- <Param name="@ID_CustomerQuestion" type="CustomerQuestion.ID_CustomerQuestion" sourceColumn="ID_CustomerQuestion" />
- <Param name="@ID_CustomerInfo" type="CustomerQuestion.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
- <Param name="@Comment_CustomerQuestion" type="CustomerQuestion.Comment_CustomerQuestion" sourceColumn="Comment_CustomerQuestion" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText=" DELETE CustomerQuestion WHERE ID_CustomerQuestion = @ID_CustomerQuestion">
- <Params>
- <Param name="@ID_CustomerQuestion" type="CustomerQuestion.ID_CustomerQuestion" sourceColumn="ID_CustomerQuestion" />
- </Params>
- </Delete>
- </Table>
- <Table name="CustomerSuggestion" Type="Child">
- <GetSchema CmdType="Text" CmdText="Select Top 0 CustomerSuggestion.* From CustomerSuggestion"/>
- <New CmdType="Text" CmdText="Insert Into dbo.CustomerSuggestion (ID_CustomerSuggestion, ID_CustomerInfo, Comment_CustomerSuggestion)
- Values (@ID_CustomerSuggestion, @ID_CustomerInfo, @Comment_CustomerSuggestion)">
- <Params>
- <Param name="@ID_CustomerSuggestion" type="CustomerSuggestion.ID_CustomerSuggestion" sourceColumn="ID_CustomerSuggestion" />
- <Param name="@ID_CustomerInfo" type="CustomerSuggestion.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
- <Param name="@Comment_CustomerSuggestion" type="CustomerSuggestion.Comment_CustomerSuggestion" sourceColumn="Comment_CustomerSuggestion" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="Update dbo.CustomerSuggestion
- Set ID_CustomerInfo = @ID_CustomerInfo,
- Comment_CustomerSuggestion = @Comment_CustomerSuggestion
- Where ID_CustomerSuggestion = @ID_CustomerSuggestion">
- <Params>
- <Param name="@ID_CustomerSuggestion" type="CustomerSuggestion.ID_CustomerSuggestion" sourceColumn="ID_CustomerSuggestion" />
- <Param name="@ID_CustomerInfo" type="CustomerSuggestion.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
- <Param name="@Comment_CustomerSuggestion" type="CustomerSuggestion.Comment_CustomerSuggestion" sourceColumn="Comment_CustomerSuggestion" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText=" DELETE CustomerSuggestion WHERE ID_CustomerSuggestion = @ID_CustomerSuggestion">
- <Params>
- <Param name="@ID_CustomerSuggestion" type="CustomerSuggestion.ID_CustomerSuggestion" sourceColumn="CustomerSuggestion" />
- </Params>
- </Delete>
- </Table>
- </Tables>
- <Search>
- <SearchCustomerInfoWithNo CmdType="Text" CmdText="DECLARE @ID_CustomerInfo uniqueidentifier
- Select CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
- No_Customer,ShortName_Customer,Name_Customer
- From CustomerInfo
- LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
- LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
- LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer
- Where No_CustomerInfo = @No_CustomerInfo
- SELECT @ID_CustomerInfo = CustomerInfo.ID_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo = @No_CustomerInfo
- Select dbo.CustomerLathe.* From dbo.CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
- Select CustomerQuestion.* From CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
- Select CustomerSuggestion.* From CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo">
- <Params>
- <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
- </Params>
- <Tables>
- <Table name="CustomerInfo" />
- <Table name="CustomerLathe" />
- <Table name="CustomerQuestion" />
- <Table name="CustomerSuggestion" />
- </Tables>
- </SearchCustomerInfoWithNo>
- <SearchCustomerWithNo CmdType="Text" CmdText="Select * From Customer Where No_Customer = @No_Customer">
- <Params>
- <Param name="@No_Customer" type="Customer.No_Customer" sourceColumn="No_Customer" />
- </Params>
- <Tables>
- <Table name="Customer" />
- </Tables>
- </SearchCustomerWithNo>
- <SearchLatheType CmdType="Text" CmdText="SELECT * FROM TypeDef WHERE Type_TypeDef = 99">
- <Tables>
- <Table name="LatheType" />
- </Tables>
- </SearchLatheType>
- <SearchAllCustomer CmdType="Text" CmdText="SELECT Customer.*,Linkman.Name_Linkman,Linkman.Tel_Linkman,No_Telephone,No_Fax
- FROM
- (
- SELECT Customer.ID_Customer,Customer.No_Customer,Customer.ShortName_Customer,Customer.Zone_Customer,Customer.SendAddr_Customer,RegistedAddress_Customer,SuspendDate_Customer,Customer.Type_Customer,Customer.Level_Customer,Customer.IsGeneric_Customer,
- ID_Linkman=(Select Top 1 ID_Linkman From Linkman Where ID_Person=Customer.ID_Customer And IsMain_Linkman=1 order by name_linkman)
- From Customer
- )Customer
- Left Join Linkman On Customer.ID_Linkman=Linkman.ID_Linkman
- LEFT JOIN Telephone ON Telephone.ID_Person = Customer.ID_Customer and Focus_Telephone = 1
- left join Fax ON Fax.ID_Person = Customer.ID_Customer and Focus_Fax = 1">
- <Tables>
- <Table name="AllCustomer" />
- </Tables>
- </SearchAllCustomer>
- <SearchCustomerInfoFirst CmdType="Text" CmdText="DECLARE @ID_CustomerInfo uniqueidentifier
- DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_CustomerInfo
- SELECT TOP 1 @NextNo = CustomerInfo.No_CustomerInfo FROM CustomerInfo
- ORDER BY CustomerInfo.No_CustomerInfo
- Select CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
- No_Customer,ShortName_Customer,Name_Customer
- From CustomerInfo
- LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
- LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
- LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer
- Where No_CustomerInfo = @NextNo
- SELECT @ID_CustomerInfo = CustomerInfo.ID_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo = @NextNo
- Select dbo.CustomerLathe.* From dbo.CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
- Select CustomerQuestion.* From CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
- Select CustomerSuggestion.* From CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo">
- <Params>
- <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
- </Params>
- <Tables>
- <Table name="CustomerInfo" />
- <Table name="CustomerLathe" />
- <Table name="CustomerQuestion" />
- <Table name="CustomerSuggestion" />
- </Tables>
- </SearchCustomerInfoFirst>
- <SearchCustomerInfoPrevious CmdType="Text" CmdText="DECLARE @ID_CustomerInfo uniqueidentifier
- DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_CustomerInfo
- SELECT TOP 1 @NextNo = CustomerInfo.No_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo < @No_CustomerInfo
- ORDER BY CustomerInfo.No_CustomerInfo Desc
- Select CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
- No_Customer,ShortName_Customer,Name_Customer
- From CustomerInfo
- LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
- LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
- LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer
- Where No_CustomerInfo = @NextNo
- SELECT @ID_CustomerInfo = CustomerInfo.ID_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo = @NextNo
- Select dbo.CustomerLathe.* From dbo.CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
- Select CustomerQuestion.* From CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
- Select CustomerSuggestion.* From CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo">
- <Params>
- <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
- </Params>
- <Tables>
- <Table name="CustomerInfo" />
- <Table name="CustomerLathe" />
- <Table name="CustomerQuestion" />
- <Table name="CustomerSuggestion" />
- </Tables>
- </SearchCustomerInfoPrevious>
- <SearchCustomerInfoNext CmdType="Text" CmdText="DECLARE @ID_CustomerInfo uniqueidentifier
- DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_CustomerInfo
- SELECT TOP 1 @NextNo = CustomerInfo.No_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo > @No_CustomerInfo
- ORDER BY CustomerInfo.No_CustomerInfo
- Select CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
- No_Customer,ShortName_Customer,Name_Customer
- From CustomerInfo
- LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
- LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
- LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer
- Where No_CustomerInfo = @NextNo
- SELECT @ID_CustomerInfo = CustomerInfo.ID_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo = @NextNo
- Select dbo.CustomerLathe.* From dbo.CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
- Select CustomerQuestion.* From CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
- Select CustomerSuggestion.* From CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo">
- <Params>
- <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
- </Params>
- <Tables>
- <Table name="CustomerInfo" />
- <Table name="CustomerLathe" />
- <Table name="CustomerQuestion" />
- <Table name="CustomerSuggestion" />
- </Tables>
- </SearchCustomerInfoNext>
- <SearchCustomerInfoLast CmdType="Text" CmdText="DECLARE @ID_CustomerInfo uniqueidentifier
- DECLARE @NextNo nvarchar(64)
- SET @NextNo = @No_CustomerInfo
- SELECT TOP 1 @NextNo = CustomerInfo.No_CustomerInfo FROM CustomerInfo
- ORDER BY CustomerInfo.No_CustomerInfo Desc
- Select CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
- No_Customer,ShortName_Customer,Name_Customer
- From CustomerInfo
- LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
- LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
- LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer
- Where No_CustomerInfo = @NextNo
- SELECT @ID_CustomerInfo = CustomerInfo.ID_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo = @NextNo
- Select dbo.CustomerLathe.* From dbo.CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
- Select CustomerQuestion.* From CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
- Select CustomerSuggestion.* From CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo">
- <Params>
- <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
- </Params>
- <Tables>
- <Table name="CustomerInfo" />
- <Table name="CustomerLathe" />
- <Table name="CustomerQuestion" />
- <Table name="CustomerSuggestion" />
- </Tables>
- </SearchCustomerInfoLast>
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- NewInstance();
- tbNo.ReadOnly=false;
- dtpDate.Enabled=false;
- tbCustomerNo.ReadOnly=true;
- txtPrincipal.ReadOnly=true;
- txtPurchaser.ReadOnly=true;
- txtLinkman.ReadOnly=true;
- txtTele.ReadOnly=true;
- txtFax.ReadOnly=true;
- txtSendAddr.ReadOnly=true;
- txtInvoiceAdress.ReadOnly=true;
- txtBeginYear.ReadOnly=true;
- txtEmplNum.ReadOnly=true;
- txtAccountLastYear.ReadOnly=true;
- txtAccountThisYear.ReadOnly=true;
- ckProduct.Enabled=false;
- ckSpecial.Enabled=false;
- ckNormal.Enabled=false;
- ikCheckBox1.Enabled=false;
- ikCheckBox2.Enabled=false;
- ikCheckBox3.Enabled=false;
- ikCheckBox5.Enabled=false;
- ikCheckBox6.Enabled=false;
- dgInvoice.ReadOnly=true;
- txtProductType.ReadOnly=true;
- btnAdd.Enabled=false;
- ckType1.Enabled=false;
- ckType2.Enabled=false;
- ckType3.Enabled=false;
- ckType4.Enabled=false;
- ckType5.Enabled=false;
- ckType6.Enabled=false;
- ckType7.Enabled=false;
- ckType8.Enabled=false;
- ckType9.Enabled=false;
- ckType10.Enabled=false;
- ckType11.Enabled=false;
- ckType12.Enabled=false;
- ckType13.Enabled=false;
- txtSY.ReadOnly=true;
- txtWX.ReadOnly=true;
- dgCurrentQuestion.ReadOnly=true;
- dgOtherQuestion.ReadOnly=true;
- toolBar.EnableSubmit=false;
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnablePrint=false;
- toolBar.EnableNew=GetRight(@Title,"新增");
- #CustomerInfo.CreateDate_CustomerInfo=DBNull();
- #CustomerInfo.LastModUser=DBNull();
- #CustomerInfo.LastModUser_CustomerInfo=DBNull();
- #CustomerInfo.LastModDate_CustomerInfo=DBNull();
- UpdateForm(true, "");
- tbNo.Focus();
- @Status=0;
- </Search>
- <New>
- Empty();
- NewInstance();
- tbNo.ReadOnly=true;
- dtpDate.Enabled=true;
- tbCustomerNo.ReadOnly=false;
- txtPrincipal.ReadOnly=false;
- txtPurchaser.ReadOnly=false;
- txtLinkman.ReadOnly=false;
- txtTele.ReadOnly=false;
- txtFax.ReadOnly=false;
- txtSendAddr.ReadOnly=false;
- txtInvoiceAdress.ReadOnly=false;
- txtBeginYear.ReadOnly=false;
- txtEmplNum.ReadOnly=false;
- txtAccountLastYear.ReadOnly=false;
- txtAccountThisYear.ReadOnly=false;
- ckProduct.Enabled=true;
- ckSpecial.Enabled=true;
- ckNormal.Enabled=true;
- ikCheckBox1.Enabled=true;
- ikCheckBox2.Enabled=true;
- ikCheckBox3.Enabled=true;
- ikCheckBox5.Enabled=true;
- ikCheckBox6.Enabled=true;
- dgInvoice.ReadOnly=false;
- txtProductType.ReadOnly=false;
- btnAdd.Enabled=true;
- ckType1.Enabled=true;
- ckType2.Enabled=true;
- ckType3.Enabled=true;
- ckType4.Enabled=true;
- ckType5.Enabled=true;
- ckType6.Enabled=true;
- ckType7.Enabled=true;
- ckType8.Enabled=true;
- ckType9.Enabled=true;
- ckType10.Enabled=true;
- ckType11.Enabled=true;
- ckType12.Enabled=true;
- ckType13.Enabled=true;
- txtSY.ReadOnly=false;
- txtWX.ReadOnly=false;
- dgCurrentQuestion.ReadOnly=false;
- dgOtherQuestion.ReadOnly=false;
- toolBar.EnableSubmit=GetRight(@Title,"新增");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnablePrint=false;
- toolBar.EnableNew=false;
- #CustomerInfo.No_CustomerInfo=tbNo.CValue;
- #CustomerInfo.CreatorName_CustomerInfo=GetCurrentUser();
- #CustomerInfo.ID_CustomerInfo=NewGuid();
- #CustomerInfo.ID_Creator=GetLoginUserID();
- #CustomerInfo.CreateDate_CustomerInfo=DateTimeNow();
- #CustomerInfo.LastModUser=DBNull();
- #CustomerInfo.LastModDate_CustomerInfo=DBNull();
- if(ckProduct.Checked==true)
- #CustomerInfo.IsProduct_CustomerInfo = 1;
- else
- #CustomerInfo.IsProduct_CustomerInfo = 0;
- if(ckSpecial.Checked==true)
- #CustomerInfo.IsSpecial_CustomerInfo = 1;
- else
- #CustomerInfo.IsSpecial_CustomerInfo = 0;
- if(ckNormal.Checked==true)
- #CustomerInfo.IsNormal_CustomerInfo = 1;
- else
- #CustomerInfo.IsNormal_CustomerInfo = 0;
- if(ikCheckBox1.Checked==true)
- #CustomerInfo.IsAgent_CustomerInfo = 1;
- else
- #CustomerInfo.IsAgent_CustomerInfo = 0;
- if(ikCheckBox2.Checked==true)
- #CustomerInfo.IsDealer_CustomerInfo = 1;
- else
- #CustomerInfo.IsDealer_CustomerInfo = 0;
- if(ikCheckBox3.Checked==true)
- #CustomerInfo.IsTooldealer_CustomerInfo = 1;
- else
- #CustomerInfo.IsTooldealer_CustomerInfo = 0;
- if(ikCheckBox5.Checked==true)
- #CustomerInfo.IsToolAgent_CustomerInfo = 1;
- else
- #CustomerInfo.IsToolAgent_CustomerInfo = 0;
- if(ikCheckBox6.Checked==true)
- #CustomerInfo.IsDotask_CustomerInfo = 1;
- else
- #CustomerInfo.IsDotask_CustomerInfo = 0;
- UpdateForm(true, "");
- @Status=1;
- </New>
- <View>
- tbNo.ReadOnly=false;
- dtpDate.Enabled=false;
- tbCustomerNo.ReadOnly=true;
- txtPrincipal.ReadOnly=true;
- txtPurchaser.ReadOnly=true;
- txtLinkman.ReadOnly=true;
- txtTele.ReadOnly=true;
- txtFax.ReadOnly=true;
- txtSendAddr.ReadOnly=true;
- txtInvoiceAdress.ReadOnly=true;
- txtBeginYear.ReadOnly=true;
- txtEmplNum.ReadOnly=true;
- txtAccountLastYear.ReadOnly=true;
- txtAccountThisYear.ReadOnly=true;
- ckProduct.Enabled=false;
- ckSpecial.Enabled=false;
- ckNormal.Enabled=false;
- ikCheckBox1.Enabled=false;
- ikCheckBox2.Enabled=false;
- ikCheckBox3.Enabled=false;
- ikCheckBox5.Enabled=false;
- ikCheckBox6.Enabled=false;
- dgInvoice.ReadOnly=true;
- txtProductType.ReadOnly=true;
- btnAdd.Enabled=false;
- ckType1.Enabled=false;
- ckType2.Enabled=false;
- ckType3.Enabled=false;
- ckType4.Enabled=false;
- ckType5.Enabled=false;
- ckType6.Enabled=false;
- ckType7.Enabled=false;
- ckType8.Enabled=false;
- ckType9.Enabled=false;
- ckType10.Enabled=false;
- ckType11.Enabled=false;
- ckType12.Enabled=false;
- ckType13.Enabled=false;
- txtSY.ReadOnly=true;
- txtWX.ReadOnly=true;
- dgCurrentQuestion.ReadOnly=true;
- dgOtherQuestion.ReadOnly=true;
- toolBar.EnableSubmit=false;
- toolBar.EnableModify=GetRight(@Title,"修改");
- toolBar.EnableDelete=GetRight(@Title,"删除");
- toolBar.EnablePrint=GetRight(@Title,"打印");
- toolBar.EnableNew = GetRight(@Title,"新增");
- if(#CustomerInfo.IsProduct_CustomerInfo == true)
- ckProduct.Checked = true;
- else
- ckProduct.Checked = false;
- if(#CustomerInfo.IsSpecial_CustomerInfo == true)
- ckSpecial.Checked = true;
- else
- ckSpecial.Checked = false;
- if(#CustomerInfo.IsNormal_CustomerInfo == true)
- ckNormal.Checked = true;
- else
- ckNormal.Checked = false;
- if(#CustomerInfo.IsAgent_CustomerInfo == true)
- ikCheckBox1.Checked=true;
- else
- ikCheckBox1.Checked=false;
- if( #CustomerInfo.IsDealer_CustomerInfo == true)
- ikCheckBox2.Checked=true;
- else
- ikCheckBox2.Checked=false;
- if(#CustomerInfo.IsTooldealer_CustomerInfo == true)
- ikCheckBox3.Checked=true;
- else
- ikCheckBox3.Checked=false;
- if(#CustomerInfo.IsToolAgent_CustomerInfo == true)
- ikCheckBox5.Checked=true;
- else
- ikCheckBox5.Checked=false;
- if(#CustomerInfo.IsDotask_CustomerInfo == true)
- ikCheckBox6.Checked=true;
- else
- ikCheckBox6.Checked=false;
- UpdateForm(true, "");
- @Status=2;
- </View>
- <Modify>
- tbNo.ReadOnly=true;
- dtpDate.Enabled=true;
- tbCustomerNo.ReadOnly=false;
- txtPrincipal.ReadOnly=false;
- txtPurchaser.ReadOnly=false;
- txtLinkman.ReadOnly=false;
- txtTele.ReadOnly=false;
- txtFax.ReadOnly=false;
- txtSendAddr.ReadOnly=false;
- txtInvoiceAdress.ReadOnly=false;
- txtBeginYear.ReadOnly=false;
- txtEmplNum.ReadOnly=false;
- txtAccountLastYear.ReadOnly=false;
- txtAccountThisYear.ReadOnly=false;
- ckProduct.Enabled=true;
- ckSpecial.Enabled=true;
- ckNormal.Enabled=true;
- ikCheckBox1.Enabled=true;
- ikCheckBox2.Enabled=true;
- ikCheckBox3.Enabled=true;
- ikCheckBox5.Enabled=true;
- ikCheckBox6.Enabled=true;
- dgInvoice.ReadOnly=false;
- txtProductType.ReadOnly=false;
- btnAdd.Enabled=true;
- ckType1.Enabled=true;
- ckType2.Enabled=true;
- ckType3.Enabled=true;
- ckType4.Enabled=true;
- ckType5.Enabled=true;
- ckType6.Enabled=true;
- ckType7.Enabled=true;
- ckType8.Enabled=true;
- ckType9.Enabled=true;
- ckType10.Enabled=true;
- ckType11.Enabled=true;
- ckType12.Enabled=true;
- ckType13.Enabled=true;
- txtSY.ReadOnly=false;
- txtWX.ReadOnly=false;
- dgCurrentQuestion.ReadOnly=false;
- dgOtherQuestion.ReadOnly=false;
- toolBar.EnableSubmit=GetRight(@Title,"新增");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=GetRight(@Title,"删除");
- toolBar.EnablePrint=false;
- toolBar.EnableNew=false;
- #CustomerInfo.LastModUser=GetCurrentUser();
- #CustomerInfo.LastModUser_CustomerInfo=GetLoginUserID();
- #CustomerInfo.LastModDate_CustomerInfo=GetCurrentTime();
- if(ckProduct.Checked==true)
- #CustomerInfo.IsProduct_CustomerInfo = 1;
- else
- #CustomerInfo.IsProduct_CustomerInfo = 0;
- if(ckSpecial.Checked==true)
- #CustomerInfo.IsSpecial_CustomerInfo = 1;
- else
- #CustomerInfo.IsSpecial_CustomerInfo = 0;
- if(ckNormal.Checked==true)
- #CustomerInfo.IsNormal_CustomerInfo = 1;
- else
- #CustomerInfo.IsNormal_CustomerInfo = 0;
- if(ikCheckBox1.Checked==true)
- #CustomerInfo.IsAgent_CustomerInfo = 1;
- else
- #CustomerInfo.IsAgent_CustomerInfo = 0;
- if(ikCheckBox2.Checked==true)
- #CustomerInfo.IsDealer_CustomerInfo = 1;
- else
- #CustomerInfo.IsDealer_CustomerInfo = 0;
- if(ikCheckBox3.Checked==true)
- #CustomerInfo.IsTooldealer_CustomerInfo = 1;
- else
- #CustomerInfo.IsTooldealer_CustomerInfo = 0;
- if(ikCheckBox5.Checked==true)
- #CustomerInfo.IsToolAgent_CustomerInfo = 1;
- else
- #CustomerInfo.IsToolAgent_CustomerInfo = 0;
- if(ikCheckBox6.Checked==true)
- #CustomerInfo.IsDotask_CustomerInfo = 1;
- else
- #CustomerInfo.IsDotask_CustomerInfo = 0;
- UpdateForm(true, "");
- @Status=3;
- </Modify>
- <SubmitButtonClick>
- <![CDATA[
- if (!Search("SearchCustomerWithNo", tbCustomerNo.CValue) || !Equals(#CustomerInfo.ID_Customer,#Customer.ID_Customer))
- {
- MessageBox("请输入有效的客户编号,并按回车确认!",@Title);
- tbCustomerNo.Focus();
- return;
- }
- UpdateForm(false, "");
-
- if(@Status==1)
- {
- SuspendLayout();
- for (@i=0;@i<RowCount("#CustomerLathe");@i=@i+1)
- {
- SetPosition("#CustomerLathe", @i);
- if (Equals(#CustomerLathe.ID_CustomerLathe,GuidEmpty()))
- #CustomerLathe.ID_CustomerLathe = NewGuid();
- #CustomerLathe.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
- }
- for (@i=0;@i<RowCount("#CustomerQuestion");@i=@i+1)
- {
- SetPosition("#CustomerQuestion", @i);
- if (Equals(#CustomerQuestion.ID_CustomerQuestion,GuidEmpty()))
- #CustomerQuestion.ID_CustomerQuestion = NewGuid();
- #CustomerQuestion.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
- }
- for (@i=0;@i<RowCount("#CustomerSuggestion");@i=@i+1)
- {
- SetPosition("#CustomerSuggestion", @i);
- if (Equals(#CustomerSuggestion.ID_CustomerSuggestion,GuidEmpty()))
- #CustomerSuggestion.ID_CustomerSuggestion = NewGuid();
- #CustomerSuggestion.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
- }
- ResumeLayout();
- #CustomerInfo.LastModUser_CustomerInfo=DBNull();
- #CustomerInfo.LastModDate_CustomerInfo=DBNull();
- New();
- }
- else if(@Status == 3)
- {
- SuspendLayout();
- for (@i=0;@i<RowCount("#CustomerLathe");@i=@i+1)
- {
- SetPosition("#CustomerLathe", @i);
- if (Equals(#CustomerLathe.ID_CustomerLathe,GuidEmpty()))
- #CustomerLathe.ID_CustomerLathe = NewGuid();
- #CustomerLathe.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
- }
- for (@i=0;@i<RowCount("#CustomerQuestion");@i=@i+1)
- {
- SetPosition("#CustomerQuestion", @i);
- if (Equals(#CustomerQuestion.ID_CustomerQuestion,GuidEmpty()))
- #CustomerQuestion.ID_CustomerQuestion = NewGuid();
- #CustomerQuestion.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
- }
- for (@i=0;@i<RowCount("#CustomerSuggestion");@i=@i+1)
- {
- SetPosition("#CustomerSuggestion", @i);
- if (Equals(#CustomerSuggestion.ID_CustomerSuggestion,GuidEmpty()))
- #CustomerSuggestion.ID_CustomerSuggestion = NewGuid();
- #CustomerSuggestion.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
- }
- ResumeLayout();
- #CustomerInfo.LastModUser=GetCurrentUser();
- #CustomerInfo.LastModUser_CustomerInfo=GetLoginUserID();
- #CustomerInfo.LastModDate_CustomerInfo=GetCurrentTime();
- Update();
- }
- ChangeMode("View");
- ]]>
- </SubmitButtonClick>
- </Lables>
- </Form>
- </Forms>
|