; ; @Temp = ShowSearchBox("CustomerInfoSearch","INFOMATION",tbNo.CValue); if(@Temp != StringEmpty()) { tbNo.CValue = @Temp; UpdateForm(false, ""); if(Search("SearchCustomerInfoWithNo",tbNo.CValue)) { ChangeMode("View"); } } if(ckProduct.Checked) #CustomerInfo.IsProduct_CustomerInfo = 1; else #CustomerInfo.IsProduct_CustomerInfo = 0; if(ckSpecial.Checked) #CustomerInfo.IsSpecial_CustomerInfo = 1; else #CustomerInfo.IsSpecial_CustomerInfo = 0; if(ckNormal.Checked) #CustomerInfo.IsNormal_CustomerInfo = 1; else #CustomerInfo.IsNormal_CustomerInfo = 0; if(ikCheckBox1.Checked) #CustomerInfo.IsAgent_CustomerInfo = 1; else #CustomerInfo.IsAgent_CustomerInfo = 0; if(ikCheckBox2.Checked) #CustomerInfo.IsDealer_CustomerInfo = 1; else #CustomerInfo.IsDealer_CustomerInfo = 0; if(ikCheckBox3.Checked) #CustomerInfo.IsTooldealer_CustomerInfo = 1; else #CustomerInfo.IsTooldealer_CustomerInfo = 0; if(ikCheckBox5.Checked) #CustomerInfo.IsToolAgent_CustomerInfo = 1; else #CustomerInfo.IsToolAgent_CustomerInfo = 0; if(ikCheckBox6.Checked) #CustomerInfo.IsDotask_CustomerInfo = 1; else #CustomerInfo.IsDotask_CustomerInfo = 0; Search("SearchLatheType"); SetDataGridColumnDataSource(1,"dgInvoice"); #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"); if(Search("SearchCustomerInfoFirst",tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchCustomerInfoPrevious",tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchCustomerInfoNext",tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchCustomerInfoLast",tbNo.CValue)) { ChangeMode("View"); } ChangeMode("Search"); ChangeMode("Modify"); Delete(); ChangeMode("Search"); PrintReport(); ; ; ; ; ; ;
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; 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; 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; 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;