; ; @Temp = ShowSearchBox("CompanySearch","INFOMATION"); if(@Temp != StringEmpty()) { tbNo.CValue = @Temp; ActiveControlEvent("tbNo", "Enter"); UpdateForm(false, ""); if(Search("SearchCompanyWithNo", tbNo.CValue)) { ChangeMode("View"); } } if(Search("SearchCompanyWithNo",#CompanyList.No_Company)) { ChangeMode("View"); } if(Search("SearchCompanyFirst", tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchCompanyPrevious", tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchCompanyNext", tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchCompanyLast", tbNo.CValue)) { ChangeMode("View"); } ChangeMode("Search"); ; ChangeMode("Modify"); Delete(); ChangeMode("Search"); #Company.CountryName = cbCountry.Text; PrintReport(); ; ; ; ; ; if(toolBar.ExpandForm==true) { pnRight.Visible=true; if(!@HaveSearchCompanyList) { Search("SearchCompanyList"); @HaveSearchCompanyList=true; } } else { pnRight.Visible=false; }
Empty(); NewInstance(); tbNo.ReadOnly=false; txtShortName.ReadOnly=true; txtName.ReadOnly=true; txtRegistedAddress.ReadOnly=true; cbCountry.Enabled=false; txtPostalCode.ReadOnly=true; txtTel.ReadOnly=true; txtFax.ReadOnly=true; dtpIsSuspend.Enabled=false; txtComment.ReadOnly=true; txtSendAddress.ReadOnly=true; txtBank.Enabled=false; txtAccount.ReadOnly=true; txtRevenueRegisterNo.ReadOnly=true; txtInvoiceTitle.ReadOnly=true; txtInvoiceAddress.ReadOnly=true; toolBar.EnableSubmit=false; toolBar.EnableModify=false; toolBar.EnableDelete=false; #Company.CreateDate_Company=DBNull(); #Company.SuspendDate_Company=DBNull(); #Company.LastModUser_Company=DBNull(); #Company.LastModDate_Company=DBNull(); UpdateForm(true, ""); tbNo.Focus(); @Status=0; tbNo.ReadOnly=false; txtShortName.ReadOnly=true; txtName.ReadOnly=true; txtRegistedAddress.ReadOnly=true; cbCountry.Enabled=false; txtPostalCode.ReadOnly=true; txtTel.ReadOnly=true; txtFax.ReadOnly=true; dtpIsSuspend.Enabled=false; txtComment.ReadOnly=true; txtSendAddress.ReadOnly=true; txtBank.Enabled=false; txtAccount.ReadOnly=true; txtRevenueRegisterNo.ReadOnly=true; txtInvoiceTitle.ReadOnly=true; txtInvoiceAddress.ReadOnly=true; toolBar.EnableSubmit=false; if(Equals(GetLoginCompanyID(),#Company.ID_Company)) toolBar.EnableModify=GetRight(@Title,"新增"); else toolBar.EnableModify=false; toolBar.EnableDelete=GetRight(@Title,"删除"); UpdateForm(true, ""); @Status=2; tbNo.ReadOnly=true; txtShortName.ReadOnly=false; txtName.ReadOnly=false; txtRegistedAddress.ReadOnly=false; cbCountry.Enabled=true; txtPostalCode.ReadOnly=false; txtTel.ReadOnly=false; txtFax.ReadOnly=false; dtpIsSuspend.Enabled=false; txtComment.ReadOnly=false; txtSendAddress.ReadOnly=false; txtBank.Enabled=true; txtAccount.ReadOnly=false; txtRevenueRegisterNo.ReadOnly=false; txtInvoiceTitle.ReadOnly=false; txtInvoiceAddress.ReadOnly=false; toolBar.EnableSubmit=GetRight(@Title,"新增"); toolBar.EnableModify=false; toolBar.EnableDelete=GetRight(@Title,"删除"); #Company.LastModUser_Company=GetCurrentUser(); #Company.LastModDate_Company=DateTimeNow(); UpdateForm(true, ""); txtShortName.Focus(); @Status=3;