; ; if(tbNo.ReadOnly == false) { if(tbNo.CValue != StringEmpty()) { UpdateForm(false, ""); if(Search("SearchPrePayWithNo", tbNo.CValue)) { ChangeMode("View"); } else { MessageBox("该预付帐款不存在!",@Title); } } else { MessageBox("请输入付款编号!", @Title); } } ShowSearchBox("BillSearch","NODEPOT", "tbNo",tbNo.CValue); UpdateForm(false,""); if(tbSupplierNo.CValue!=StringEmpty()) { if(!Search("SearchSupplier",tbSupplierNo.CValue)) { MessageBox("该供应商不存在!",@Title); @temp = ShowSearchBox("SupplierSearch","INFOMATION",tbSupplierNo.CValue); if(@temp != "") { tbSupplierNo.CValue = @temp; ActiveControlEvent("tbSupplierNo", "Enter"); } } else { if(!Equals(#Supplier.SuspendDate_Supplier,DBNull())) { MessageBox("该供应商已停用!",@Title); } #PrePay.ID_Supplier=#Supplier.ID_Supplier; #PrePay.ShortName_Supplier=#Supplier.ShortName_Supplier; #PrePay.Balance_PrePay=#Supplier.PreGetBalance_Supplier; } } else { MessageBox("请输入供应商编号!",@Title); #PrePay.ID_Supplier=GuidEmpty(); #PrePay.ShortName_Supplier=""; #PrePay.Balance_PrePay=0; tbSupplierNo.Focus(); } UpdateForm(true,""); if (tbSupplierNo.ReadOnly == false) { @temp = ShowSearchBox("SupplierSearch","INFOMATION",tbSupplierNo.CValue); if(@temp == "") { return; } else { tbSupplierNo.CValue = @temp; ActiveControlEvent("tbSupplierNo", "Enter"); } } UpdateForm(false, "cbPayType"); Search("SearchMethod"); UpdateForm(true, "cbPayType"); UpdateForm(false, "cbTransactor"); Search("SearchPayer"); UpdateForm(true, "cbTransactor"); if(Search("SearchPrePayFirst")) { ChangeMode("View"); } if(Search("SearchPrePayPrevious", tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchPrePayNext",tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchPrePayLast")) { ChangeMode("View"); } ChangeMode("Search"); ChangeMode("Modify"); Delete(); ChangeMode("Search"); PrintReport(); BeginAudit(); #PrePay.ID_Assessor=GetLoginUserID(); #PrePay.Assessor=GetCurrentUser(); #PrePay.AssessDate_PrePay=DateTimeNow(); Audit(); ChangeMode("View"); EndAudit(); BeginUnAudit(); #PrePay.ID_Assessor=DBNull(); #PrePay.Assessor=DBNull(); #PrePay.AssessDate_PrePay=DataTimeNow(); UnAudit(); ChangeMode("View"); EndUnAudit(); ; ; ; ;
Empty(); NewInstance(); tbNo.ReadOnly=false; dtDate.Enabled=false; tbSupplierNo.ReadOnly=true; txtVoucherDate.Enabled=false; txtVoucherNo.ReadOnly=true; cbTransactor.Enabled=false; ntbMoney.ReadOnly=true; txtComment.ReadOnly=true; cbPayType.Enabled=false; #PrePay.Creator=DBNull(); #PrePay.ID_Creator=DBNull(); #PrePay.Assessor=DBNull(); #PrePay.ID_Assessor=DBNull(); #PrePay.AssessDate_PrePay=DBNull(); #PrePay.LastModUser_PrePay=DBNull(); #PrePay.LastModUser=DBNull(); #PrePay.LastModDate_PrePay=DBNull(); toolBar.EnableSubmit=false; toolBar.EnableModify=false; toolBar.EnableDelete=false; toolBar.EnableAudit=false; toolBar.EnableUnAudit=false; toolBar.EnableNew=GetRight(@Title,"新增"); toolBar.EnablePrint=false; UpdateForm(true,""); tbNo.Focus(); @Status=0; Empty(); NewInstance(); tbNo.ReadOnly=true; dtDate.Enabled=true; tbSupplierNo.ReadOnly=false; txtVoucherDate.Enabled=true; txtVoucherNo.ReadOnly=false; cbTransactor.Enabled=true; ntbMoney.ReadOnly=false; txtComment.ReadOnly=false; cbPayType.Enabled=true; #PrePay.ID_PrePay=NewGuid(); #PrePay.PayCurrency_PrePay=@SysCurrency; #PrePay.Currency_PrePay=@SysCurrency; #PrePay.Rate_PrePay=1.00; #PrePay.Creator=GetCurrentUser(); #PrePay.ID_Creator=GetLoginUserID(); #PrePay.Assessor=DBNull(); #PrePay.ID_Assessor=DBNull(); #PrePay.AssessDate_PrePay=DBNull(); #PrePay.LastModUser_PrePay=DBNull(); #PrePay.LastModUser=DBNull(); #PrePay.LastModDate_PrePay=DBNull(); #PrePay.Date_PrePay=GetCurrentTime(); toolBar.EnableSubmit=GetRight(@Title,"新增"); toolBar.EnableModify=false; toolBar.EnableDelete=false; toolBar.EnableAudit=false; toolBar.EnableUnAudit=false; toolBar.EnableNew=false; toolBar.EnablePrint=false; UpdateForm(true,""); @Status=1; tbNo.ReadOnly=false; dtDate.Enabled=false; tbSupplierNo.ReadOnly=true; txtVoucherDate.Enabled=false; txtVoucherNo.ReadOnly=true; cbTransactor.Enabled=false; ntbMoney.ReadOnly=true; txtComment.ReadOnly=true; cbPayType.Enabled=false; toolBar.EnableSubmit=false; toolBar.EnableNew=GetRight(@Title,"新增"); if(Equals(#PrePay.ID_Assessor, DBNull())) { toolBar.EnableAudit=GetRight(@Title,"审核"); toolBar.EnableUnAudit=false; toolBar.EnableModify=GetRight(@Title,"修改"); toolBar.EnableDelete=GetRight(@Title,"删除"); } else { toolBar.EnableAudit=false; toolBar.EnableUnAudit=GetRight(@Title,"取消审核"); toolBar.EnableModify=false; toolBar.EnableDelete=false; } toolBar.EnablePrint=GetRight(@Title,"打印"); UpdateForm(true, ""); @Status=2; tbNo.ReadOnly=true; dtDate.Enabled=false; tbSupplierNo.ReadOnly=false; txtVoucherDate.Enabled=true; txtVoucherNo.ReadOnly=false; cbTransactor.Enabled=true; ntbMoney.ReadOnly=false; txtComment.ReadOnly=false; cbPayType.Enabled=true; #PrePay.LastModUser=GetCurrentUser(); #PrePay.LastModUser_PrePay=GetLoginUserID(); #PrePay.LastModDate_PrePay=GetCurrentTime(); toolBar.EnableSubmit=GetRight(@Title,"修改"); toolBar.EnableModify=false; toolBar.EnableDelete=false; toolBar.EnableAudit=false; toolBar.EnableUnAudit=false; toolBar.EnableNew=false; toolBar.EnablePrint=false; UpdateForm(true, ""); @Status=3;