FrmCustomerMaintain.xml 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <Forms>
  3. <Form Name="FrmCustomerMaintain">
  4. <Client>
  5. <Events>
  6. <Load>
  7. <![CDATA[
  8. @Title="客户资料维护";
  9. GetSchema();
  10. ChangeMode("Search");
  11. dgInvoice.NoMember="No_CustomerLathe";
  12. ]]>
  13. </Load>
  14. <Closing>
  15. ;
  16. </Closing>
  17. <Closed>
  18. ;
  19. </Closed>
  20. </Events>
  21. <Mode>
  22. <Search>
  23. <Lable name="Search" />
  24. </Search>
  25. <New>
  26. <Lable name="New" />
  27. </New>
  28. <View>
  29. <Lable name="View" />
  30. </View>
  31. <Modify>
  32. <Lable name="Modify" />
  33. </Modify>
  34. </Mode>
  35. <Controls>
  36. <IKDateTimePicker name="dtpDate" DataSource="CustomerInfo.Date_CustomerInfo"/>
  37. <IKTextButton name="tbNo" DataSource="CustomerInfo.No_CustomerInfo">
  38. <Events>
  39. <Enter>
  40. <![CDATA[
  41. if(tbNo.ReadOnly == false)
  42. {
  43. if(tbNo.CValue != StringEmpty())
  44. {
  45. UpdateForm(false, "");
  46. if(Search("SearchCustomerInfoWithNo", tbNo.CValue))
  47. {
  48. ChangeMode("View");
  49. }
  50. else
  51. {
  52. MessageBox(该编号不存在!);
  53. }
  54. }
  55. else
  56. {
  57. MessageBox("请输入客户编号!",@Title);
  58. }
  59. }
  60. ]]>
  61. </Enter>
  62. <Click>
  63. @Temp = ShowSearchBox("CustomerInfoSearch","INFOMATION",tbNo.CValue);
  64. if(@Temp != StringEmpty())
  65. {
  66. tbNo.CValue = @Temp;
  67. UpdateForm(false, "");
  68. if(Search("SearchCustomerInfoWithNo",tbNo.CValue))
  69. {
  70. ChangeMode("View");
  71. }
  72. }
  73. </Click>
  74. </Events>
  75. </IKTextButton>
  76. <IKTextButton name="tbCustomerNo" DataSource="CustomerInfo.No_Customer">
  77. <Events>
  78. <Enter>
  79. <![CDATA[
  80. if (tbCustomerNo.ReadOnly == false)
  81. {
  82. UpdateForm(false, "");
  83. if (tbCustomerNo.CValue == "" || !Search("SearchCustomerWithNo", tbCustomerNo.CValue))
  84. {
  85. if (tbCustomerNo.CValue == "")
  86. {
  87. MessageBox("请输入客户编号!", @Title);
  88. }
  89. else
  90. {
  91. MessageBox("该客户不存在!",@Title);
  92. @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo.CValue);
  93. if(@temp != "")
  94. {
  95. tbCustomerNo.CValue = @temp;
  96. ActiveControlEvent("tbCustomerNo", "Enter");
  97. }
  98. }
  99. }
  100. else
  101. {
  102. if (!Equals(#Customer.SuspendDate_Customer,DBNull()))
  103. {
  104. MessageBox("该客户被暂停,不能销货!",@Title);
  105. tbCustomerNo.Focus();
  106. return;
  107. }
  108. #CustomerInfo.ID_Customer = #Customer.ID_Customer;
  109. #CustomerInfo.Name_Customer = #Customer.Name_Customer;
  110. #CustomerInfo.ShortName_Customer = #Customer.ShortName_Customer;
  111. }
  112. UpdateForm(true, "");
  113. }
  114. ]]>
  115. </Enter>
  116. <Click>
  117. <![CDATA[
  118. if (tbCustomerNo.ReadOnly == false)
  119. {
  120. @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo.CValue);
  121. if( @temp == "" )
  122. return;
  123. tbCustomerNo.CValue = @temp;
  124. ActiveControlEvent("tbCustomerNo", "Enter");
  125. }
  126. ]]>
  127. </Click>
  128. </Events>
  129. </IKTextButton>
  130. <IKTextBox name="txtCustomerShortName" DataSource="CustomerInfo.ShortName_Customer"/>
  131. <IKTextBox name="txtCustomerName" DataSource="CustomerInfo.Name_Customer"/>
  132. <IKTextBox name="txtPrincipal" DataSource="CustomerInfo.Principal_CustomerInfo"/>
  133. <IKTextBox name="txtPurchaser" DataSource="CustomerInfo.Purchase_CustomerInfo"/>
  134. <IKTextBox name="txtLinkman" DataSource="CustomerInfo.Linkman_CustomerInfo"/>
  135. <IKTextBox name="txtTele" DataSource="CustomerInfo.Tel_CustomerInfo"/>
  136. <IKTextBox name="txtFax" DataSource="CustomerInfo.Fax_CustomerInfo"/>
  137. <IKTextBox name="txtSendAddr" DataSource="CustomerInfo.SendAddr_CustomerInfo"/>
  138. <IKTextBox name="txtInvoiceAdress" DataSource="CustomerInfo.InvoiceAddr_CustomerInfo"/>
  139. <IKTextBox name="txtCreator" DataSource="CustomerInfo.CreatorName_CustomerInfo"/>
  140. <IKDateTimeText name="dtCreateDate" DataSource="CustomerInfo.CreateDate_CustomerInfo"/>
  141. <IKTextBox name="txtLastModUser" DataSource="CustomerInfo.LastModUser"/>
  142. <IKDateTimeText name="dtLastModDate" DataSource="CustomerInfo.LastModDate_CustomerInfo"/>
  143. <IKTextBox name="txtBeginYear" DataSource="CustomerInfo.FromDate_CustomerInfo"/>
  144. <IKTextBox name="txtEmplNum" DataSource="CustomerInfo.Member_CustomerInfo"/>
  145. <IKTextBox name="txtAccountLastYear" DataSource="CustomerInfo.LastTurnover_CustomerInfo"/>
  146. <IKTextBox name="txtAccountThisYear" DataSource="CustomerInfo.Turnover_CustomerInfo"/>
  147. <IKCheckBox name="ckProduct" DataSource="CustomerInfo.IsProduct_CustomerInfo">
  148. <Events>
  149. <CheckedChanged>
  150. if(ckProduct.Checked)
  151. #CustomerInfo.IsProduct_CustomerInfo = 1;
  152. else
  153. #CustomerInfo.IsProduct_CustomerInfo = 0;
  154. </CheckedChanged>
  155. </Events>
  156. </IKCheckBox>
  157. <IKCheckBox name="ckSpecial" DataSource="CustomerInfo.IsSpecial_CustomerInfo">
  158. <Events>
  159. <CheckedChanged>
  160. if(ckSpecial.Checked)
  161. #CustomerInfo.IsSpecial_CustomerInfo = 1;
  162. else
  163. #CustomerInfo.IsSpecial_CustomerInfo = 0;
  164. </CheckedChanged>
  165. </Events>
  166. </IKCheckBox>
  167. <IKCheckBox name="ckNormal" DataSource="CustomerInfo.IsNormal_CustomerInfo">
  168. <Events>
  169. <CheckedChanged>
  170. if(ckNormal.Checked)
  171. #CustomerInfo.IsNormal_CustomerInfo = 1;
  172. else
  173. #CustomerInfo.IsNormal_CustomerInfo = 0;
  174. </CheckedChanged>
  175. </Events>
  176. </IKCheckBox>
  177. <IKCheckBox name="ikCheckBox1" DataSource="CustomerInfo.IsAgent_CustomerInfo">
  178. <Events>
  179. <CheckedChanged>
  180. if(ikCheckBox1.Checked)
  181. #CustomerInfo.IsAgent_CustomerInfo = 1;
  182. else
  183. #CustomerInfo.IsAgent_CustomerInfo = 0;
  184. </CheckedChanged>
  185. </Events>
  186. </IKCheckBox>
  187. <IKCheckBox name="ikCheckBox2" DataSource="CustomerInfo.IsDealer_CustomerInfo">
  188. <Events>
  189. <CheckedChanged>
  190. if(ikCheckBox2.Checked)
  191. #CustomerInfo.IsDealer_CustomerInfo = 1;
  192. else
  193. #CustomerInfo.IsDealer_CustomerInfo = 0;
  194. </CheckedChanged>
  195. </Events>
  196. </IKCheckBox>
  197. <IKCheckBox name="ikCheckBox3" DataSource="CustomerInfo.IsTooldealer_CustomerInfo">
  198. <Events>
  199. <CheckedChanged>
  200. if(ikCheckBox3.Checked)
  201. #CustomerInfo.IsTooldealer_CustomerInfo = 1;
  202. else
  203. #CustomerInfo.IsTooldealer_CustomerInfo = 0;
  204. </CheckedChanged>
  205. </Events>
  206. </IKCheckBox>
  207. <IKCheckBox name="ikCheckBox5" DataSource="CustomerInfo.IsToolAgent_CustomerInfo">
  208. <Events>
  209. <CheckedChanged>
  210. if(ikCheckBox5.Checked)
  211. #CustomerInfo.IsToolAgent_CustomerInfo = 1;
  212. else
  213. #CustomerInfo.IsToolAgent_CustomerInfo = 0;
  214. </CheckedChanged>
  215. </Events>
  216. </IKCheckBox>
  217. <IKCheckBox name="ikCheckBox6" DataSource="CustomerInfo.IsDotask_CustomerInfo">
  218. <Events>
  219. <CheckedChanged>
  220. if(ikCheckBox6.Checked)
  221. #CustomerInfo.IsDotask_CustomerInfo = 1;
  222. else
  223. #CustomerInfo.IsDotask_CustomerInfo = 0;
  224. </CheckedChanged>
  225. </Events>
  226. </IKCheckBox>
  227. <IKDataGridEx name="dgInvoice" DataSource="CustomerLathe" TableStyleIndex="0">
  228. <DataColumn Index="0" DataSource="CustomerLathe.No_CustomerLathe" />
  229. <DataColumn Index="1" DataSource="CustomerLathe.LatheType_CustomerLathe" >
  230. <IKDataGridComboBoxColumn DisplaySourceEx="CustomerLathe.LatheType_CustomerLathe" ValueSourceEx="CustomerLathe.LatheType_CustomerLathe" DataSourceEx="LatheType" DisplayMemberEx="Name_TypeDef" ValueMemberEx="Name_TypeDef">
  231. <Events>
  232. <Reload>
  233. Search("SearchLatheType");
  234. SetDataGridColumnDataSource(1,"dgInvoice");
  235. </Reload>
  236. </Events>
  237. </IKDataGridComboBoxColumn>
  238. </DataColumn>
  239. <DataColumn Index="2" DataSource="CustomerLathe.Manufacturer_CustomerLathe" />
  240. <DataColumn Index="3" DataSource="CustomerLathe.Type_CustomerLathe" />
  241. <DataColumn Index="4" DataSource="CustomerLathe.Quantity_CustomerLathe" />
  242. </IKDataGridEx>
  243. <IKButton name="btnAdd">
  244. <Events>
  245. <Click>
  246. #CustomerInfo.ProductType_CustomerInfo = "";
  247. if(ckType1.Checked)
  248. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType1.Text + ";";
  249. if(ckType2.Checked)
  250. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType2.Text + ";";
  251. if(ckType3.Checked)
  252. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType3.Text + ";";
  253. if(ckType4.Checked)
  254. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType4.Text + ";";
  255. if(ckType5.Checked)
  256. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType5.Text + ";";
  257. if(ckType6.Checked)
  258. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType6.Text + ";";
  259. if(ckType7.Checked)
  260. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType7.Text + ";";
  261. if(ckType8.Checked)
  262. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType8.Text + ";";
  263. if(ckType9.Checked)
  264. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType9.Text + ";";
  265. if(ckType10.Checked)
  266. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType10.Text + ";";
  267. if(ckType11.Checked)
  268. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType11.Text + ";";
  269. if(ckType12.Checked)
  270. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType12.Text + ";";
  271. if(ckType13.Checked)
  272. #CustomerInfo.ProductType_CustomerInfo = #CustomerInfo.ProductType_CustomerInfo + ckType13.Text + ";";
  273. UpdateForm(true,"txtProductType");
  274. </Click>
  275. </Events>
  276. </IKButton>
  277. <IKTextBox name="txtProductType" DataSource="CustomerInfo.ProductType_CustomerInfo"/>
  278. <IKTextBox name="txtSY" DataSource="CustomerInfo.Upriver_CustomerInfo"/>
  279. <IKTextBox name="txtWX" DataSource="CustomerInfo.Satellite_CustomerInfo"/>
  280. <IKDataGridEx name="dgCurrentQuestion" DataSource="CustomerQuestion" TableStyleIndex="0">
  281. <DataColumn Index="0" DataSource="CustomerQuestion.Comment_CustomerQuestion" />
  282. </IKDataGridEx>
  283. <IKDataGridEx name="dgOtherQuestion" DataSource="CustomerSuggestion" TableStyleIndex="0">
  284. <DataColumn Index="0" DataSource="CustomerSuggestion.Comment_CustomerSuggestion" />
  285. </IKDataGridEx>
  286. <IKFormToolBar name="toolBar">
  287. <Events>
  288. <ClickFirst>
  289. if(Search("SearchCustomerInfoFirst",tbNo.CValue))
  290. {
  291. ChangeMode("View");
  292. }
  293. </ClickFirst>
  294. <ClickPrev>
  295. if(Search("SearchCustomerInfoPrevious",tbNo.CValue))
  296. {
  297. ChangeMode("View");
  298. }
  299. </ClickPrev>
  300. <ClickNext>
  301. if(Search("SearchCustomerInfoNext",tbNo.CValue))
  302. {
  303. ChangeMode("View");
  304. }
  305. </ClickNext>
  306. <ClickLast>
  307. if(Search("SearchCustomerInfoLast",tbNo.CValue))
  308. {
  309. ChangeMode("View");
  310. }
  311. </ClickLast>
  312. <ClickNew>
  313. <![CDATA[
  314. @NextNo = GetNextAutoNumber(true);
  315. if (!Equals(@NextNo, ""))
  316. {
  317. ChangeMode("New");
  318. #CustomerInfo.No_CustomerInfo = @NextNo;
  319. UpdateForm(true, "tbNo");
  320. }
  321. ]]>
  322. </ClickNew>
  323. <ClickEmpty>
  324. ChangeMode("Search");
  325. </ClickEmpty>
  326. <ClickSubmit>
  327. <Lable name="SubmitButtonClick" />
  328. </ClickSubmit>
  329. <ClickModify>
  330. ChangeMode("Modify");
  331. </ClickModify>
  332. <ClickDelete>
  333. Delete(); ChangeMode("Search");
  334. </ClickDelete>
  335. <ClickPrint>
  336. PrintReport();
  337. </ClickPrint>
  338. <ClickAudit>
  339. ;
  340. </ClickAudit>
  341. <ClickUnAudit>
  342. ;
  343. </ClickUnAudit>
  344. <ClickImport>
  345. ;
  346. </ClickImport>
  347. <ClickExport>
  348. ;
  349. </ClickExport>
  350. <ClickClose>
  351. ;
  352. </ClickClose>
  353. <ClickExpand>
  354. ;
  355. </ClickExpand>
  356. </Events>
  357. </IKFormToolBar>
  358. </Controls>
  359. <LockInfomation LockID="ID_CustomerInfo" LockNO="No_CustomerInfo" LockSearchFunction="SearchCustomerInfoWithNo"/>
  360. <ChildForms>
  361. <ChildForm name="CustomerSearch" DataSource="Customer" SearchFunction="SearchAllCustomer" SearchFunctionCondition="SearchCustomerCondition" SearchFunctionByNo="" MappingName="客户">
  362. <DataColumn Index="0" MappingName="#Customer.No_Customer" HeaderText="客户编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  363. <DataColumn Index="1" MappingName="#Customer.ShortName_Customer" HeaderText="客户简称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  364. <DataColumn Index="2" MappingName="#Customer.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  365. <DataColumn Index="3" MappingName="#Customer.Level_Customer" HeaderText="客户等级" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  366. <DataColumn Index="4" MappingName="#Customer.IsGeneric_Customer" HeaderText="一般客户" Width="75" ColumnType="IKDataGridBoolColumn"/>
  367. <DataColumn Index="5" MappingName="#Customer.Zone_Customer" HeaderText="地区" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  368. <DataColumn Index="6" MappingName="#Customer.SendAddr_Customer" HeaderText="送货地址" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  369. <DataColumn Index="7" MappingName="#Customer.Name_Linkman" HeaderText="主要联系人" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  370. <DataColumn Index="8" MappingName="#Customer.No_Telephone" HeaderText="客户电话" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  371. <DataColumn Index="9" MappingName="#Customer.No_Fax" HeaderText="传真" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  372. </ChildForm>
  373. </ChildForms>
  374. </Client>
  375. <Server>
  376. <Tables>
  377. <Table name="CustomerInfo" Type="Parent">
  378. <GetSchema CmdType="Text" CmdText="Select Top 0 CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
  379. No_Customer,ShortName_Customer,Name_Customer
  380. From CustomerInfo
  381. LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
  382. LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
  383. LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer"/>
  384. <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)
  385. 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)">
  386. <Params>
  387. <Param name="@ID_CustomerInfo" type="CustomerInfo.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
  388. <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
  389. <Param name="@Date_CustomerInfo" type="CustomerInfo.Date_CustomerInfo" sourceColumn="Date_CustomerInfo" />
  390. <Param name="@ID_Customer" type="CustomerInfo.ID_Customer" sourceColumn="ID_Customer" />
  391. <Param name="@Principal_CustomerInfo" type="CustomerInfo.Principal_CustomerInfo" sourceColumn="Principal_CustomerInfo" />
  392. <Param name="@Purchase_CustomerInfo" type="CustomerInfo.Purchase_CustomerInfo" sourceColumn="Purchase_CustomerInfo" />
  393. <Param name="@Linkman_CustomerInfo" type="CustomerInfo.Linkman_CustomerInfo" sourceColumn="Linkman_CustomerInfo" />
  394. <Param name="@Tel_CustomerInfo" type="CustomerInfo.Tel_CustomerInfo" sourceColumn="Tel_CustomerInfo" />
  395. <Param name="@Fax_CustomerInfo" type="CustomerInfo.Fax_CustomerInfo" sourceColumn="Fax_CustomerInfo" />
  396. <Param name="@SendAddr_CustomerInfo" type="CustomerInfo.SendAddr_CustomerInfo" sourceColumn="SendAddr_CustomerInfo" />
  397. <Param name="@InvoiceAddr_CustomerInfo" type="CustomerInfo.InvoiceAddr_CustomerInfo" sourceColumn="InvoiceAddr_CustomerInfo" />
  398. <Param name="@FromDate_CustomerInfo" type="CustomerInfo.FromDate_CustomerInfo" sourceColumn="FromDate_CustomerInfo" />
  399. <Param name="@Member_CustomerInfo" type="CustomerInfo.Member_CustomerInfo" sourceColumn="Member_CustomerInfo" />
  400. <Param name="@LastTurnover_CustomerInfo" type="CustomerInfo.LastTurnover_CustomerInfo" sourceColumn="LastTurnover_CustomerInfo" />
  401. <Param name="@Turnover_CustomerInfo" type="CustomerInfo.Turnover_CustomerInfo" sourceColumn="Turnover_CustomerInfo" />
  402. <Param name="@ProductType_CustomerInfo" type="CustomerInfo.ProductType_CustomerInfo" sourceColumn="ProductType_CustomerInfo" />
  403. <Param name="@Upriver_CustomerInfo" type="CustomerInfo.Upriver_CustomerInfo" sourceColumn="Upriver_CustomerInfo" />
  404. <Param name="@Satellite_CustomerInfo" type="CustomerInfo.Satellite_CustomerInfo" sourceColumn="Satellite_CustomerInfo" />
  405. <Param name="@ID_Creator" type="CustomerInfo.ID_Creator" sourceColumn="ID_Creator" />
  406. <Param name="@CreateDate_CustomerInfo" type="CustomerInfo.CreateDate_CustomerInfo" sourceColumn="CreateDate_CustomerInfo" />
  407. <Param name="@LastModDate_CustomerInfo" type="CustomerInfo.LastModDate_CustomerInfo" sourceColumn="LastModDate_CustomerInfo" />
  408. <Param name="@LastModUser_CustomerInfo" type="CustomerInfo.LastModUser_CustomerInfo" sourceColumn="LastModUser_CustomerInfo" />
  409. <Param name="@IsProduct_CustomerInfo" type="CustomerInfo.IsProduct_CustomerInfo" sourceColumn="IsProduct_CustomerInfo" />
  410. <Param name="@IsSpecial_CustomerInfo" type="CustomerInfo.IsSpecial_CustomerInfo" sourceColumn="IsSpecial_CustomerInfo" />
  411. <Param name="@IsNormal_CustomerInfo" type="CustomerInfo.IsNormal_CustomerInfo" sourceColumn="IsNormal_CustomerInfo" />
  412. <Param name="@IsAgent_CustomerInfo" type="CustomerInfo.IsAgent_CustomerInfo" sourceColumn="IsAgent_CustomerInfo" />
  413. <Param name="@IsDealer_CustomerInfo" type="CustomerInfo.IsDealer_CustomerInfo" sourceColumn="IsDealer_CustomerInfo" />
  414. <Param name="@IsTooldealer_CustomerInfo" type="CustomerInfo.IsTooldealer_CustomerInfo" sourceColumn="IsTooldealer_CustomerInfo" />
  415. <Param name="@IsToolAgent_CustomerInfo" type="CustomerInfo.IsToolAgent_CustomerInfo" sourceColumn="IsToolAgent_CustomerInfo" />
  416. <Param name="@IsDotask_CustomerInfo" type="CustomerInfo.IsDotask_CustomerInfo" sourceColumn="IsDotask_CustomerInfo" />
  417. </Params>
  418. </New>
  419. <Update CmdType="Text" CmdText="Update dbo.CustomerInfo
  420. Set No_CustomerInfo = @No_CustomerInfo,
  421. Date_CustomerInfo = @Date_CustomerInfo,
  422. ID_Customer = @ID_Customer,
  423. Principal_CustomerInfo = @Principal_CustomerInfo,
  424. Purchase_CustomerInfo = @Purchase_CustomerInfo,
  425. Linkman_CustomerInfo = @Linkman_CustomerInfo,
  426. Tel_CustomerInfo = @Tel_CustomerInfo,
  427. Fax_CustomerInfo = @Fax_CustomerInfo,
  428. SendAddr_CustomerInfo = @SendAddr_CustomerInfo,
  429. InvoiceAddr_CustomerInfo = @InvoiceAddr_CustomerInfo,
  430. FromDate_CustomerInfo = @FromDate_CustomerInfo,
  431. Member_CustomerInfo = @Member_CustomerInfo,
  432. LastTurnover_CustomerInfo = @LastTurnover_CustomerInfo,
  433. Turnover_CustomerInfo = @Turnover_CustomerInfo,
  434. ProductType_CustomerInfo = @ProductType_CustomerInfo,
  435. Upriver_CustomerInfo = @Upriver_CustomerInfo,
  436. Satellite_CustomerInfo = @Satellite_CustomerInfo,
  437. ID_Creator = @ID_Creator,
  438. CreateDate_CustomerInfo = @CreateDate_CustomerInfo,
  439. LastModDate_CustomerInfo = @LastModDate_CustomerInfo,
  440. LastModUser_CustomerInfo = @LastModUser_CustomerInfo,
  441. IsProduct_CustomerInfo = @IsProduct_CustomerInfo,
  442. IsSpecial_CustomerInfo = @IsSpecial_CustomerInfo,
  443. IsNormal_CustomerInfo = @IsNormal_CustomerInfo,
  444. IsAgent_CustomerInfo = @IsAgent_CustomerInfo,
  445. IsDealer_CustomerInfo = @IsDealer_CustomerInfo,
  446. IsTooldealer_CustomerInfo = @IsTooldealer_CustomerInfo,
  447. IsToolAgent_CustomerInfo = @IsToolAgent_CustomerInfo,
  448. IsDotask_CustomerInfo = @IsDotask_CustomerInfo
  449. Where ID_CustomerInfo = @ID_CustomerInfo">
  450. <Params>
  451. <Param name="@ID_CustomerInfo" type="CustomerInfo.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
  452. <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
  453. <Param name="@Date_CustomerInfo" type="CustomerInfo.Date_CustomerInfo" sourceColumn="Date_CustomerInfo" />
  454. <Param name="@ID_Customer" type="CustomerInfo.ID_Customer" sourceColumn="ID_Customer" />
  455. <Param name="@Principal_CustomerInfo" type="CustomerInfo.Principal_CustomerInfo" sourceColumn="Principal_CustomerInfo" />
  456. <Param name="@Purchase_CustomerInfo" type="CustomerInfo.Purchase_CustomerInfo" sourceColumn="Purchase_CustomerInfo" />
  457. <Param name="@Linkman_CustomerInfo" type="CustomerInfo.Linkman_CustomerInfo" sourceColumn="Linkman_CustomerInfo" />
  458. <Param name="@Tel_CustomerInfo" type="CustomerInfo.Tel_CustomerInfo" sourceColumn="Tel_CustomerInfo" />
  459. <Param name="@Fax_CustomerInfo" type="CustomerInfo.Fax_CustomerInfo" sourceColumn="Fax_CustomerInfo" />
  460. <Param name="@SendAddr_CustomerInfo" type="CustomerInfo.SendAddr_CustomerInfo" sourceColumn="SendAddr_CustomerInfo" />
  461. <Param name="@InvoiceAddr_CustomerInfo" type="CustomerInfo.InvoiceAddr_CustomerInfo" sourceColumn="InvoiceAddr_CustomerInfo" />
  462. <Param name="@FromDate_CustomerInfo" type="CustomerInfo.FromDate_CustomerInfo" sourceColumn="FromDate_CustomerInfo" />
  463. <Param name="@Member_CustomerInfo" type="CustomerInfo.Member_CustomerInfo" sourceColumn="Member_CustomerInfo" />
  464. <Param name="@LastTurnover_CustomerInfo" type="CustomerInfo.LastTurnover_CustomerInfo" sourceColumn="LastTurnover_CustomerInfo" />
  465. <Param name="@Turnover_CustomerInfo" type="CustomerInfo.Turnover_CustomerInfo" sourceColumn="Turnover_CustomerInfo" />
  466. <Param name="@ProductType_CustomerInfo" type="CustomerInfo.ProductType_CustomerInfo" sourceColumn="ProductType_CustomerInfo" />
  467. <Param name="@Upriver_CustomerInfo" type="CustomerInfo.Upriver_CustomerInfo" sourceColumn="Upriver_CustomerInfo" />
  468. <Param name="@Satellite_CustomerInfo" type="CustomerInfo.Satellite_CustomerInfo" sourceColumn="Satellite_CustomerInfo" />
  469. <Param name="@ID_Creator" type="CustomerInfo.ID_Creator" sourceColumn="ID_Creator" />
  470. <Param name="@CreateDate_CustomerInfo" type="CustomerInfo.CreateDate_CustomerInfo" sourceColumn="CreateDate_CustomerInfo" />
  471. <Param name="@LastModDate_CustomerInfo" type="CustomerInfo.LastModDate_CustomerInfo" sourceColumn="LastModDate_CustomerInfo" />
  472. <Param name="@LastModUser_CustomerInfo" type="CustomerInfo.LastModUser_CustomerInfo" sourceColumn="LastModUser_CustomerInfo" />
  473. <Param name="@IsProduct_CustomerInfo" type="CustomerInfo.IsProduct_CustomerInfo" sourceColumn="IsProduct_CustomerInfo" />
  474. <Param name="@IsSpecial_CustomerInfo" type="CustomerInfo.IsSpecial_CustomerInfo" sourceColumn="IsSpecial_CustomerInfo" />
  475. <Param name="@IsNormal_CustomerInfo" type="CustomerInfo.IsNormal_CustomerInfo" sourceColumn="IsNormal_CustomerInfo" />
  476. <Param name="@IsAgent_CustomerInfo" type="CustomerInfo.IsAgent_CustomerInfo" sourceColumn="IsAgent_CustomerInfo" />
  477. <Param name="@IsDealer_CustomerInfo" type="CustomerInfo.IsDealer_CustomerInfo" sourceColumn="IsDealer_CustomerInfo" />
  478. <Param name="@IsTooldealer_CustomerInfo" type="CustomerInfo.IsTooldealer_CustomerInfo" sourceColumn="IsTooldealer_CustomerInfo" />
  479. <Param name="@IsToolAgent_CustomerInfo" type="CustomerInfo.IsToolAgent_CustomerInfo" sourceColumn="IsToolAgent_CustomerInfo" />
  480. <Param name="@IsDotask_CustomerInfo" type="CustomerInfo.IsDotask_CustomerInfo" sourceColumn="IsDotask_CustomerInfo" />
  481. </Params>
  482. </Update>
  483. <Delete CmdType="Text" CmdText="Delete CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
  484. Delete CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
  485. Delete CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo
  486. Delete CustomerInfo Where ID_CustomerInfo = @ID_CustomerInfo">
  487. <Params>
  488. <Param name="@ID_CustomerInfo" type="CustomerInfo.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
  489. </Params>
  490. </Delete>
  491. <FKErrorReport ErrorMessage="该客户已被引用,删除失败!"/>
  492. <UNIQUEErrorReport ErrorMessage="该建档编号已存在,提交失败!"/>
  493. </Table>
  494. <Table name="CustomerLathe" Type="Child">
  495. <GetSchema CmdType="Text" CmdText="Select Top 0 dbo.CustomerLathe.* From dbo.CustomerLathe"/>
  496. <New CmdType="Text" CmdText="Insert Into dbo.CustomerLathe (ID_CustomerLathe, ID_CustomerInfo, No_CustomerLathe, LatheType_CustomerLathe, Manufacturer_CustomerLathe, Type_CustomerLathe, Quantity_CustomerLathe)
  497. Values (@ID_CustomerLathe, @ID_CustomerInfo, @No_CustomerLathe, @LatheType_CustomerLathe, @Manufacturer_CustomerLathe, @Type_CustomerLathe, @Quantity_CustomerLathe)">
  498. <Params>
  499. <Param name="@ID_CustomerLathe" type="CustomerLathe.ID_CustomerLathe" sourceColumn="ID_CustomerLathe" />
  500. <Param name="@ID_CustomerInfo" type="CustomerLathe.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
  501. <Param name="@No_CustomerLathe" type="CustomerLathe.No_CustomerLathe" sourceColumn="No_CustomerLathe" />
  502. <Param name="@LatheType_CustomerLathe" type="CustomerLathe.LatheType_CustomerLathe" sourceColumn="LatheType_CustomerLathe" />
  503. <Param name="@Manufacturer_CustomerLathe" type="CustomerLathe.Manufacturer_CustomerLathe" sourceColumn="Manufacturer_CustomerLathe" />
  504. <Param name="@Type_CustomerLathe" type="CustomerLathe.Type_CustomerLathe" sourceColumn="Type_CustomerLathe" />
  505. <Param name="@Quantity_CustomerLathe" type="CustomerLathe.Quantity_CustomerLathe" sourceColumn="Quantity_CustomerLathe" />
  506. </Params>
  507. </New>
  508. <Update CmdType="Text" CmdText="Update dbo.CustomerLathe
  509. Set ID_CustomerInfo = @ID_CustomerInfo,
  510. No_CustomerLathe = @No_CustomerLathe,
  511. LatheType_CustomerLathe = @LatheType_CustomerLathe,
  512. Manufacturer_CustomerLathe = @Manufacturer_CustomerLathe,
  513. Type_CustomerLathe = @Type_CustomerLathe,
  514. Quantity_CustomerLathe = @Quantity_CustomerLathe
  515. Where ID_CustomerLathe = @ID_CustomerLathe">
  516. <Params>
  517. <Param name="@ID_CustomerLathe" type="CustomerLathe.ID_CustomerLathe" sourceColumn="ID_CustomerLathe" />
  518. <Param name="@ID_CustomerInfo" type="CustomerLathe.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
  519. <Param name="@No_CustomerLathe" type="CustomerLathe.No_CustomerLathe" sourceColumn="No_CustomerLathe" />
  520. <Param name="@LatheType_CustomerLathe" type="CustomerLathe.LatheType_CustomerLathe" sourceColumn="LatheType_CustomerLathe" />
  521. <Param name="@Manufacturer_CustomerLathe" type="CustomerLathe.Manufacturer_CustomerLathe" sourceColumn="Manufacturer_CustomerLathe" />
  522. <Param name="@Type_CustomerLathe" type="CustomerLathe.Type_CustomerLathe" sourceColumn="Type_CustomerLathe" />
  523. <Param name="@Quantity_CustomerLathe" type="CustomerLathe.Quantity_CustomerLathe" sourceColumn="Quantity_CustomerLathe" />
  524. </Params>
  525. </Update>
  526. <Delete CmdType="Text" CmdText="Delete CustomerLathe Where ID_CustomerLathe = @ID_CustomerLathe">
  527. <Params>
  528. <Param name="@ID_CustomerLathe" type="CustomerLathe.ID_CustomerInfo" sourceColumn="ID_CustomerLathe" />
  529. </Params>
  530. </Delete>
  531. </Table>
  532. <Table name="CustomerQuestion" Type="Child">
  533. <GetSchema CmdType="Text" CmdText="Select Top 0 CustomerQuestion.* From CustomerQuestion"/>
  534. <New CmdType="Text" CmdText="Insert Into dbo.CustomerQuestion (ID_CustomerQuestion, ID_CustomerInfo, Comment_CustomerQuestion)
  535. Values (@ID_CustomerQuestion, @ID_CustomerInfo, @Comment_CustomerQuestion)">
  536. <Params>
  537. <Param name="@ID_CustomerQuestion" type="CustomerQuestion.ID_CustomerQuestion" sourceColumn="ID_CustomerQuestion" />
  538. <Param name="@ID_CustomerInfo" type="CustomerQuestion.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
  539. <Param name="@Comment_CustomerQuestion" type="CustomerQuestion.Comment_CustomerQuestion" sourceColumn="Comment_CustomerQuestion" />
  540. </Params>
  541. </New>
  542. <Update CmdType="Text" CmdText="Update dbo.CustomerQuestion
  543. Set ID_CustomerInfo = @ID_CustomerInfo,
  544. Comment_CustomerQuestion = @Comment_CustomerQuestion
  545. Where ID_CustomerQuestion = @ID_CustomerQuestion">
  546. <Params>
  547. <Param name="@ID_CustomerQuestion" type="CustomerQuestion.ID_CustomerQuestion" sourceColumn="ID_CustomerQuestion" />
  548. <Param name="@ID_CustomerInfo" type="CustomerQuestion.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
  549. <Param name="@Comment_CustomerQuestion" type="CustomerQuestion.Comment_CustomerQuestion" sourceColumn="Comment_CustomerQuestion" />
  550. </Params>
  551. </Update>
  552. <Delete CmdType="Text" CmdText=" DELETE CustomerQuestion WHERE ID_CustomerQuestion = @ID_CustomerQuestion">
  553. <Params>
  554. <Param name="@ID_CustomerQuestion" type="CustomerQuestion.ID_CustomerQuestion" sourceColumn="ID_CustomerQuestion" />
  555. </Params>
  556. </Delete>
  557. </Table>
  558. <Table name="CustomerSuggestion" Type="Child">
  559. <GetSchema CmdType="Text" CmdText="Select Top 0 CustomerSuggestion.* From CustomerSuggestion"/>
  560. <New CmdType="Text" CmdText="Insert Into dbo.CustomerSuggestion (ID_CustomerSuggestion, ID_CustomerInfo, Comment_CustomerSuggestion)
  561. Values (@ID_CustomerSuggestion, @ID_CustomerInfo, @Comment_CustomerSuggestion)">
  562. <Params>
  563. <Param name="@ID_CustomerSuggestion" type="CustomerSuggestion.ID_CustomerSuggestion" sourceColumn="ID_CustomerSuggestion" />
  564. <Param name="@ID_CustomerInfo" type="CustomerSuggestion.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
  565. <Param name="@Comment_CustomerSuggestion" type="CustomerSuggestion.Comment_CustomerSuggestion" sourceColumn="Comment_CustomerSuggestion" />
  566. </Params>
  567. </New>
  568. <Update CmdType="Text" CmdText="Update dbo.CustomerSuggestion
  569. Set ID_CustomerInfo = @ID_CustomerInfo,
  570. Comment_CustomerSuggestion = @Comment_CustomerSuggestion
  571. Where ID_CustomerSuggestion = @ID_CustomerSuggestion">
  572. <Params>
  573. <Param name="@ID_CustomerSuggestion" type="CustomerSuggestion.ID_CustomerSuggestion" sourceColumn="ID_CustomerSuggestion" />
  574. <Param name="@ID_CustomerInfo" type="CustomerSuggestion.ID_CustomerInfo" sourceColumn="ID_CustomerInfo" />
  575. <Param name="@Comment_CustomerSuggestion" type="CustomerSuggestion.Comment_CustomerSuggestion" sourceColumn="Comment_CustomerSuggestion" />
  576. </Params>
  577. </Update>
  578. <Delete CmdType="Text" CmdText=" DELETE CustomerSuggestion WHERE ID_CustomerSuggestion = @ID_CustomerSuggestion">
  579. <Params>
  580. <Param name="@ID_CustomerSuggestion" type="CustomerSuggestion.ID_CustomerSuggestion" sourceColumn="CustomerSuggestion" />
  581. </Params>
  582. </Delete>
  583. </Table>
  584. </Tables>
  585. <Search>
  586. <SearchCustomerInfoWithNo CmdType="Text" CmdText="DECLARE @ID_CustomerInfo uniqueidentifier
  587. Select CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
  588. No_Customer,ShortName_Customer,Name_Customer
  589. From CustomerInfo
  590. LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
  591. LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
  592. LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer
  593. Where No_CustomerInfo = @No_CustomerInfo
  594. SELECT @ID_CustomerInfo = CustomerInfo.ID_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo = @No_CustomerInfo
  595. Select dbo.CustomerLathe.* From dbo.CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
  596. Select CustomerQuestion.* From CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
  597. Select CustomerSuggestion.* From CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo">
  598. <Params>
  599. <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
  600. </Params>
  601. <Tables>
  602. <Table name="CustomerInfo" />
  603. <Table name="CustomerLathe" />
  604. <Table name="CustomerQuestion" />
  605. <Table name="CustomerSuggestion" />
  606. </Tables>
  607. </SearchCustomerInfoWithNo>
  608. <SearchCustomerWithNo CmdType="Text" CmdText="Select * From Customer Where No_Customer = @No_Customer">
  609. <Params>
  610. <Param name="@No_Customer" type="Customer.No_Customer" sourceColumn="No_Customer" />
  611. </Params>
  612. <Tables>
  613. <Table name="Customer" />
  614. </Tables>
  615. </SearchCustomerWithNo>
  616. <SearchLatheType CmdType="Text" CmdText="SELECT * FROM TypeDef WHERE Type_TypeDef = 99">
  617. <Tables>
  618. <Table name="LatheType" />
  619. </Tables>
  620. </SearchLatheType>
  621. <SearchAllCustomer CmdType="Text" CmdText="SELECT Customer.*,Linkman.Name_Linkman,Linkman.Tel_Linkman,No_Telephone,No_Fax
  622. FROM
  623. (
  624. 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,
  625. ID_Linkman=(Select Top 1 ID_Linkman From Linkman Where ID_Person=Customer.ID_Customer And IsMain_Linkman=1 order by name_linkman)
  626. From Customer
  627. )Customer
  628. Left Join Linkman On Customer.ID_Linkman=Linkman.ID_Linkman
  629. LEFT JOIN Telephone ON Telephone.ID_Person = Customer.ID_Customer and Focus_Telephone = 1
  630. left join Fax ON Fax.ID_Person = Customer.ID_Customer and Focus_Fax = 1">
  631. <Tables>
  632. <Table name="AllCustomer" />
  633. </Tables>
  634. </SearchAllCustomer>
  635. <SearchCustomerInfoFirst CmdType="Text" CmdText="DECLARE @ID_CustomerInfo uniqueidentifier
  636. DECLARE @NextNo nvarchar(64)
  637. SET @NextNo = @No_CustomerInfo
  638. SELECT TOP 1 @NextNo = CustomerInfo.No_CustomerInfo FROM CustomerInfo
  639. ORDER BY CustomerInfo.No_CustomerInfo
  640. Select CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
  641. No_Customer,ShortName_Customer,Name_Customer
  642. From CustomerInfo
  643. LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
  644. LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
  645. LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer
  646. Where No_CustomerInfo = @NextNo
  647. SELECT @ID_CustomerInfo = CustomerInfo.ID_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo = @NextNo
  648. Select dbo.CustomerLathe.* From dbo.CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
  649. Select CustomerQuestion.* From CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
  650. Select CustomerSuggestion.* From CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo">
  651. <Params>
  652. <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
  653. </Params>
  654. <Tables>
  655. <Table name="CustomerInfo" />
  656. <Table name="CustomerLathe" />
  657. <Table name="CustomerQuestion" />
  658. <Table name="CustomerSuggestion" />
  659. </Tables>
  660. </SearchCustomerInfoFirst>
  661. <SearchCustomerInfoPrevious CmdType="Text" CmdText="DECLARE @ID_CustomerInfo uniqueidentifier
  662. DECLARE @NextNo nvarchar(64)
  663. SET @NextNo = @No_CustomerInfo
  664. SELECT TOP 1 @NextNo = CustomerInfo.No_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo &lt; @No_CustomerInfo
  665. ORDER BY CustomerInfo.No_CustomerInfo Desc
  666. Select CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
  667. No_Customer,ShortName_Customer,Name_Customer
  668. From CustomerInfo
  669. LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
  670. LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
  671. LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer
  672. Where No_CustomerInfo = @NextNo
  673. SELECT @ID_CustomerInfo = CustomerInfo.ID_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo = @NextNo
  674. Select dbo.CustomerLathe.* From dbo.CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
  675. Select CustomerQuestion.* From CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
  676. Select CustomerSuggestion.* From CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo">
  677. <Params>
  678. <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
  679. </Params>
  680. <Tables>
  681. <Table name="CustomerInfo" />
  682. <Table name="CustomerLathe" />
  683. <Table name="CustomerQuestion" />
  684. <Table name="CustomerSuggestion" />
  685. </Tables>
  686. </SearchCustomerInfoPrevious>
  687. <SearchCustomerInfoNext CmdType="Text" CmdText="DECLARE @ID_CustomerInfo uniqueidentifier
  688. DECLARE @NextNo nvarchar(64)
  689. SET @NextNo = @No_CustomerInfo
  690. SELECT TOP 1 @NextNo = CustomerInfo.No_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo &gt; @No_CustomerInfo
  691. ORDER BY CustomerInfo.No_CustomerInfo
  692. Select CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
  693. No_Customer,ShortName_Customer,Name_Customer
  694. From CustomerInfo
  695. LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
  696. LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
  697. LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer
  698. Where No_CustomerInfo = @NextNo
  699. SELECT @ID_CustomerInfo = CustomerInfo.ID_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo = @NextNo
  700. Select dbo.CustomerLathe.* From dbo.CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
  701. Select CustomerQuestion.* From CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
  702. Select CustomerSuggestion.* From CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo">
  703. <Params>
  704. <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
  705. </Params>
  706. <Tables>
  707. <Table name="CustomerInfo" />
  708. <Table name="CustomerLathe" />
  709. <Table name="CustomerQuestion" />
  710. <Table name="CustomerSuggestion" />
  711. </Tables>
  712. </SearchCustomerInfoNext>
  713. <SearchCustomerInfoLast CmdType="Text" CmdText="DECLARE @ID_CustomerInfo uniqueidentifier
  714. DECLARE @NextNo nvarchar(64)
  715. SET @NextNo = @No_CustomerInfo
  716. SELECT TOP 1 @NextNo = CustomerInfo.No_CustomerInfo FROM CustomerInfo
  717. ORDER BY CustomerInfo.No_CustomerInfo Desc
  718. Select CustomerInfo.*,A.Name_User AS CreatorName_CustomerInfo,B.Name_User As LastModUser,
  719. No_Customer,ShortName_Customer,Name_Customer
  720. From CustomerInfo
  721. LEFT JOIN AppUser A ON A.ID_User = CustomerInfo.ID_Creator
  722. LEFT Join AppUser B ON B.ID_User=CustomerInfo.LastModUser_CustomerInfo
  723. LEFT Join Customer On CustomerInfo.ID_Customer = Customer.ID_Customer
  724. Where No_CustomerInfo = @NextNo
  725. SELECT @ID_CustomerInfo = CustomerInfo.ID_CustomerInfo FROM CustomerInfo WHERE CustomerInfo.No_CustomerInfo = @NextNo
  726. Select dbo.CustomerLathe.* From dbo.CustomerLathe Where ID_CustomerInfo = @ID_CustomerInfo
  727. Select CustomerQuestion.* From CustomerQuestion Where ID_CustomerInfo = @ID_CustomerInfo
  728. Select CustomerSuggestion.* From CustomerSuggestion Where ID_CustomerInfo = @ID_CustomerInfo">
  729. <Params>
  730. <Param name="@No_CustomerInfo" type="CustomerInfo.No_CustomerInfo" sourceColumn="No_CustomerInfo" />
  731. </Params>
  732. <Tables>
  733. <Table name="CustomerInfo" />
  734. <Table name="CustomerLathe" />
  735. <Table name="CustomerQuestion" />
  736. <Table name="CustomerSuggestion" />
  737. </Tables>
  738. </SearchCustomerInfoLast>
  739. </Search>
  740. </Server>
  741. <Lables>
  742. <Search>
  743. Empty();
  744. NewInstance();
  745. tbNo.ReadOnly=false;
  746. dtpDate.Enabled=false;
  747. tbCustomerNo.ReadOnly=true;
  748. txtPrincipal.ReadOnly=true;
  749. txtPurchaser.ReadOnly=true;
  750. txtLinkman.ReadOnly=true;
  751. txtTele.ReadOnly=true;
  752. txtFax.ReadOnly=true;
  753. txtSendAddr.ReadOnly=true;
  754. txtInvoiceAdress.ReadOnly=true;
  755. txtBeginYear.ReadOnly=true;
  756. txtEmplNum.ReadOnly=true;
  757. txtAccountLastYear.ReadOnly=true;
  758. txtAccountThisYear.ReadOnly=true;
  759. ckProduct.Enabled=false;
  760. ckSpecial.Enabled=false;
  761. ckNormal.Enabled=false;
  762. ikCheckBox1.Enabled=false;
  763. ikCheckBox2.Enabled=false;
  764. ikCheckBox3.Enabled=false;
  765. ikCheckBox5.Enabled=false;
  766. ikCheckBox6.Enabled=false;
  767. dgInvoice.ReadOnly=true;
  768. txtProductType.ReadOnly=true;
  769. btnAdd.Enabled=false;
  770. ckType1.Enabled=false;
  771. ckType2.Enabled=false;
  772. ckType3.Enabled=false;
  773. ckType4.Enabled=false;
  774. ckType5.Enabled=false;
  775. ckType6.Enabled=false;
  776. ckType7.Enabled=false;
  777. ckType8.Enabled=false;
  778. ckType9.Enabled=false;
  779. ckType10.Enabled=false;
  780. ckType11.Enabled=false;
  781. ckType12.Enabled=false;
  782. ckType13.Enabled=false;
  783. txtSY.ReadOnly=true;
  784. txtWX.ReadOnly=true;
  785. dgCurrentQuestion.ReadOnly=true;
  786. dgOtherQuestion.ReadOnly=true;
  787. toolBar.EnableSubmit=false;
  788. toolBar.EnableModify=false;
  789. toolBar.EnableDelete=false;
  790. toolBar.EnablePrint=false;
  791. toolBar.EnableNew=GetRight(@Title,"新增");
  792. #CustomerInfo.CreateDate_CustomerInfo=DBNull();
  793. #CustomerInfo.LastModUser=DBNull();
  794. #CustomerInfo.LastModUser_CustomerInfo=DBNull();
  795. #CustomerInfo.LastModDate_CustomerInfo=DBNull();
  796. UpdateForm(true, "");
  797. tbNo.Focus();
  798. @Status=0;
  799. </Search>
  800. <New>
  801. Empty();
  802. NewInstance();
  803. tbNo.ReadOnly=true;
  804. dtpDate.Enabled=true;
  805. tbCustomerNo.ReadOnly=false;
  806. txtPrincipal.ReadOnly=false;
  807. txtPurchaser.ReadOnly=false;
  808. txtLinkman.ReadOnly=false;
  809. txtTele.ReadOnly=false;
  810. txtFax.ReadOnly=false;
  811. txtSendAddr.ReadOnly=false;
  812. txtInvoiceAdress.ReadOnly=false;
  813. txtBeginYear.ReadOnly=false;
  814. txtEmplNum.ReadOnly=false;
  815. txtAccountLastYear.ReadOnly=false;
  816. txtAccountThisYear.ReadOnly=false;
  817. ckProduct.Enabled=true;
  818. ckSpecial.Enabled=true;
  819. ckNormal.Enabled=true;
  820. ikCheckBox1.Enabled=true;
  821. ikCheckBox2.Enabled=true;
  822. ikCheckBox3.Enabled=true;
  823. ikCheckBox5.Enabled=true;
  824. ikCheckBox6.Enabled=true;
  825. dgInvoice.ReadOnly=false;
  826. txtProductType.ReadOnly=false;
  827. btnAdd.Enabled=true;
  828. ckType1.Enabled=true;
  829. ckType2.Enabled=true;
  830. ckType3.Enabled=true;
  831. ckType4.Enabled=true;
  832. ckType5.Enabled=true;
  833. ckType6.Enabled=true;
  834. ckType7.Enabled=true;
  835. ckType8.Enabled=true;
  836. ckType9.Enabled=true;
  837. ckType10.Enabled=true;
  838. ckType11.Enabled=true;
  839. ckType12.Enabled=true;
  840. ckType13.Enabled=true;
  841. txtSY.ReadOnly=false;
  842. txtWX.ReadOnly=false;
  843. dgCurrentQuestion.ReadOnly=false;
  844. dgOtherQuestion.ReadOnly=false;
  845. toolBar.EnableSubmit=GetRight(@Title,"新增");
  846. toolBar.EnableModify=false;
  847. toolBar.EnableDelete=false;
  848. toolBar.EnablePrint=false;
  849. toolBar.EnableNew=false;
  850. #CustomerInfo.No_CustomerInfo=tbNo.CValue;
  851. #CustomerInfo.CreatorName_CustomerInfo=GetCurrentUser();
  852. #CustomerInfo.ID_CustomerInfo=NewGuid();
  853. #CustomerInfo.ID_Creator=GetLoginUserID();
  854. #CustomerInfo.CreateDate_CustomerInfo=DateTimeNow();
  855. #CustomerInfo.LastModUser=DBNull();
  856. #CustomerInfo.LastModDate_CustomerInfo=DBNull();
  857. if(ckProduct.Checked==true)
  858. #CustomerInfo.IsProduct_CustomerInfo = 1;
  859. else
  860. #CustomerInfo.IsProduct_CustomerInfo = 0;
  861. if(ckSpecial.Checked==true)
  862. #CustomerInfo.IsSpecial_CustomerInfo = 1;
  863. else
  864. #CustomerInfo.IsSpecial_CustomerInfo = 0;
  865. if(ckNormal.Checked==true)
  866. #CustomerInfo.IsNormal_CustomerInfo = 1;
  867. else
  868. #CustomerInfo.IsNormal_CustomerInfo = 0;
  869. if(ikCheckBox1.Checked==true)
  870. #CustomerInfo.IsAgent_CustomerInfo = 1;
  871. else
  872. #CustomerInfo.IsAgent_CustomerInfo = 0;
  873. if(ikCheckBox2.Checked==true)
  874. #CustomerInfo.IsDealer_CustomerInfo = 1;
  875. else
  876. #CustomerInfo.IsDealer_CustomerInfo = 0;
  877. if(ikCheckBox3.Checked==true)
  878. #CustomerInfo.IsTooldealer_CustomerInfo = 1;
  879. else
  880. #CustomerInfo.IsTooldealer_CustomerInfo = 0;
  881. if(ikCheckBox5.Checked==true)
  882. #CustomerInfo.IsToolAgent_CustomerInfo = 1;
  883. else
  884. #CustomerInfo.IsToolAgent_CustomerInfo = 0;
  885. if(ikCheckBox6.Checked==true)
  886. #CustomerInfo.IsDotask_CustomerInfo = 1;
  887. else
  888. #CustomerInfo.IsDotask_CustomerInfo = 0;
  889. UpdateForm(true, "");
  890. @Status=1;
  891. </New>
  892. <View>
  893. tbNo.ReadOnly=false;
  894. dtpDate.Enabled=false;
  895. tbCustomerNo.ReadOnly=true;
  896. txtPrincipal.ReadOnly=true;
  897. txtPurchaser.ReadOnly=true;
  898. txtLinkman.ReadOnly=true;
  899. txtTele.ReadOnly=true;
  900. txtFax.ReadOnly=true;
  901. txtSendAddr.ReadOnly=true;
  902. txtInvoiceAdress.ReadOnly=true;
  903. txtBeginYear.ReadOnly=true;
  904. txtEmplNum.ReadOnly=true;
  905. txtAccountLastYear.ReadOnly=true;
  906. txtAccountThisYear.ReadOnly=true;
  907. ckProduct.Enabled=false;
  908. ckSpecial.Enabled=false;
  909. ckNormal.Enabled=false;
  910. ikCheckBox1.Enabled=false;
  911. ikCheckBox2.Enabled=false;
  912. ikCheckBox3.Enabled=false;
  913. ikCheckBox5.Enabled=false;
  914. ikCheckBox6.Enabled=false;
  915. dgInvoice.ReadOnly=true;
  916. txtProductType.ReadOnly=true;
  917. btnAdd.Enabled=false;
  918. ckType1.Enabled=false;
  919. ckType2.Enabled=false;
  920. ckType3.Enabled=false;
  921. ckType4.Enabled=false;
  922. ckType5.Enabled=false;
  923. ckType6.Enabled=false;
  924. ckType7.Enabled=false;
  925. ckType8.Enabled=false;
  926. ckType9.Enabled=false;
  927. ckType10.Enabled=false;
  928. ckType11.Enabled=false;
  929. ckType12.Enabled=false;
  930. ckType13.Enabled=false;
  931. txtSY.ReadOnly=true;
  932. txtWX.ReadOnly=true;
  933. dgCurrentQuestion.ReadOnly=true;
  934. dgOtherQuestion.ReadOnly=true;
  935. toolBar.EnableSubmit=false;
  936. toolBar.EnableModify=GetRight(@Title,"修改");
  937. toolBar.EnableDelete=GetRight(@Title,"删除");
  938. toolBar.EnablePrint=GetRight(@Title,"打印");
  939. toolBar.EnableNew = GetRight(@Title,"新增");
  940. if(#CustomerInfo.IsProduct_CustomerInfo == true)
  941. ckProduct.Checked = true;
  942. else
  943. ckProduct.Checked = false;
  944. if(#CustomerInfo.IsSpecial_CustomerInfo == true)
  945. ckSpecial.Checked = true;
  946. else
  947. ckSpecial.Checked = false;
  948. if(#CustomerInfo.IsNormal_CustomerInfo == true)
  949. ckNormal.Checked = true;
  950. else
  951. ckNormal.Checked = false;
  952. if(#CustomerInfo.IsAgent_CustomerInfo == true)
  953. ikCheckBox1.Checked=true;
  954. else
  955. ikCheckBox1.Checked=false;
  956. if( #CustomerInfo.IsDealer_CustomerInfo == true)
  957. ikCheckBox2.Checked=true;
  958. else
  959. ikCheckBox2.Checked=false;
  960. if(#CustomerInfo.IsTooldealer_CustomerInfo == true)
  961. ikCheckBox3.Checked=true;
  962. else
  963. ikCheckBox3.Checked=false;
  964. if(#CustomerInfo.IsToolAgent_CustomerInfo == true)
  965. ikCheckBox5.Checked=true;
  966. else
  967. ikCheckBox5.Checked=false;
  968. if(#CustomerInfo.IsDotask_CustomerInfo == true)
  969. ikCheckBox6.Checked=true;
  970. else
  971. ikCheckBox6.Checked=false;
  972. UpdateForm(true, "");
  973. @Status=2;
  974. </View>
  975. <Modify>
  976. tbNo.ReadOnly=true;
  977. dtpDate.Enabled=true;
  978. tbCustomerNo.ReadOnly=false;
  979. txtPrincipal.ReadOnly=false;
  980. txtPurchaser.ReadOnly=false;
  981. txtLinkman.ReadOnly=false;
  982. txtTele.ReadOnly=false;
  983. txtFax.ReadOnly=false;
  984. txtSendAddr.ReadOnly=false;
  985. txtInvoiceAdress.ReadOnly=false;
  986. txtBeginYear.ReadOnly=false;
  987. txtEmplNum.ReadOnly=false;
  988. txtAccountLastYear.ReadOnly=false;
  989. txtAccountThisYear.ReadOnly=false;
  990. ckProduct.Enabled=true;
  991. ckSpecial.Enabled=true;
  992. ckNormal.Enabled=true;
  993. ikCheckBox1.Enabled=true;
  994. ikCheckBox2.Enabled=true;
  995. ikCheckBox3.Enabled=true;
  996. ikCheckBox5.Enabled=true;
  997. ikCheckBox6.Enabled=true;
  998. dgInvoice.ReadOnly=false;
  999. txtProductType.ReadOnly=false;
  1000. btnAdd.Enabled=true;
  1001. ckType1.Enabled=true;
  1002. ckType2.Enabled=true;
  1003. ckType3.Enabled=true;
  1004. ckType4.Enabled=true;
  1005. ckType5.Enabled=true;
  1006. ckType6.Enabled=true;
  1007. ckType7.Enabled=true;
  1008. ckType8.Enabled=true;
  1009. ckType9.Enabled=true;
  1010. ckType10.Enabled=true;
  1011. ckType11.Enabled=true;
  1012. ckType12.Enabled=true;
  1013. ckType13.Enabled=true;
  1014. txtSY.ReadOnly=false;
  1015. txtWX.ReadOnly=false;
  1016. dgCurrentQuestion.ReadOnly=false;
  1017. dgOtherQuestion.ReadOnly=false;
  1018. toolBar.EnableSubmit=GetRight(@Title,"新增");
  1019. toolBar.EnableModify=false;
  1020. toolBar.EnableDelete=GetRight(@Title,"删除");
  1021. toolBar.EnablePrint=false;
  1022. toolBar.EnableNew=false;
  1023. #CustomerInfo.LastModUser=GetCurrentUser();
  1024. #CustomerInfo.LastModUser_CustomerInfo=GetLoginUserID();
  1025. #CustomerInfo.LastModDate_CustomerInfo=GetCurrentTime();
  1026. if(ckProduct.Checked==true)
  1027. #CustomerInfo.IsProduct_CustomerInfo = 1;
  1028. else
  1029. #CustomerInfo.IsProduct_CustomerInfo = 0;
  1030. if(ckSpecial.Checked==true)
  1031. #CustomerInfo.IsSpecial_CustomerInfo = 1;
  1032. else
  1033. #CustomerInfo.IsSpecial_CustomerInfo = 0;
  1034. if(ckNormal.Checked==true)
  1035. #CustomerInfo.IsNormal_CustomerInfo = 1;
  1036. else
  1037. #CustomerInfo.IsNormal_CustomerInfo = 0;
  1038. if(ikCheckBox1.Checked==true)
  1039. #CustomerInfo.IsAgent_CustomerInfo = 1;
  1040. else
  1041. #CustomerInfo.IsAgent_CustomerInfo = 0;
  1042. if(ikCheckBox2.Checked==true)
  1043. #CustomerInfo.IsDealer_CustomerInfo = 1;
  1044. else
  1045. #CustomerInfo.IsDealer_CustomerInfo = 0;
  1046. if(ikCheckBox3.Checked==true)
  1047. #CustomerInfo.IsTooldealer_CustomerInfo = 1;
  1048. else
  1049. #CustomerInfo.IsTooldealer_CustomerInfo = 0;
  1050. if(ikCheckBox5.Checked==true)
  1051. #CustomerInfo.IsToolAgent_CustomerInfo = 1;
  1052. else
  1053. #CustomerInfo.IsToolAgent_CustomerInfo = 0;
  1054. if(ikCheckBox6.Checked==true)
  1055. #CustomerInfo.IsDotask_CustomerInfo = 1;
  1056. else
  1057. #CustomerInfo.IsDotask_CustomerInfo = 0;
  1058. UpdateForm(true, "");
  1059. @Status=3;
  1060. </Modify>
  1061. <SubmitButtonClick>
  1062. <![CDATA[
  1063. if (!Search("SearchCustomerWithNo", tbCustomerNo.CValue) || !Equals(#CustomerInfo.ID_Customer,#Customer.ID_Customer))
  1064. {
  1065. MessageBox("请输入有效的客户编号,并按回车确认!",@Title);
  1066. tbCustomerNo.Focus();
  1067. return;
  1068. }
  1069. UpdateForm(false, "");
  1070. if(@Status==1)
  1071. {
  1072. SuspendLayout();
  1073. for (@i=0;@i<RowCount("#CustomerLathe");@i=@i+1)
  1074. {
  1075. SetPosition("#CustomerLathe", @i);
  1076. if (Equals(#CustomerLathe.ID_CustomerLathe,GuidEmpty()))
  1077. #CustomerLathe.ID_CustomerLathe = NewGuid();
  1078. #CustomerLathe.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
  1079. }
  1080. for (@i=0;@i<RowCount("#CustomerQuestion");@i=@i+1)
  1081. {
  1082. SetPosition("#CustomerQuestion", @i);
  1083. if (Equals(#CustomerQuestion.ID_CustomerQuestion,GuidEmpty()))
  1084. #CustomerQuestion.ID_CustomerQuestion = NewGuid();
  1085. #CustomerQuestion.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
  1086. }
  1087. for (@i=0;@i<RowCount("#CustomerSuggestion");@i=@i+1)
  1088. {
  1089. SetPosition("#CustomerSuggestion", @i);
  1090. if (Equals(#CustomerSuggestion.ID_CustomerSuggestion,GuidEmpty()))
  1091. #CustomerSuggestion.ID_CustomerSuggestion = NewGuid();
  1092. #CustomerSuggestion.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
  1093. }
  1094. ResumeLayout();
  1095. #CustomerInfo.LastModUser_CustomerInfo=DBNull();
  1096. #CustomerInfo.LastModDate_CustomerInfo=DBNull();
  1097. New();
  1098. }
  1099. else if(@Status == 3)
  1100. {
  1101. SuspendLayout();
  1102. for (@i=0;@i<RowCount("#CustomerLathe");@i=@i+1)
  1103. {
  1104. SetPosition("#CustomerLathe", @i);
  1105. if (Equals(#CustomerLathe.ID_CustomerLathe,GuidEmpty()))
  1106. #CustomerLathe.ID_CustomerLathe = NewGuid();
  1107. #CustomerLathe.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
  1108. }
  1109. for (@i=0;@i<RowCount("#CustomerQuestion");@i=@i+1)
  1110. {
  1111. SetPosition("#CustomerQuestion", @i);
  1112. if (Equals(#CustomerQuestion.ID_CustomerQuestion,GuidEmpty()))
  1113. #CustomerQuestion.ID_CustomerQuestion = NewGuid();
  1114. #CustomerQuestion.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
  1115. }
  1116. for (@i=0;@i<RowCount("#CustomerSuggestion");@i=@i+1)
  1117. {
  1118. SetPosition("#CustomerSuggestion", @i);
  1119. if (Equals(#CustomerSuggestion.ID_CustomerSuggestion,GuidEmpty()))
  1120. #CustomerSuggestion.ID_CustomerSuggestion = NewGuid();
  1121. #CustomerSuggestion.ID_CustomerInfo =#CustomerInfo.ID_CustomerInfo;
  1122. }
  1123. ResumeLayout();
  1124. #CustomerInfo.LastModUser=GetCurrentUser();
  1125. #CustomerInfo.LastModUser_CustomerInfo=GetLoginUserID();
  1126. #CustomerInfo.LastModDate_CustomerInfo=GetCurrentTime();
  1127. Update();
  1128. }
  1129. ChangeMode("View");
  1130. ]]>
  1131. </SubmitButtonClick>
  1132. </Lables>
  1133. </Form>
  1134. </Forms>