; ; @Temp = ShowSearchBox("LocationSearch","INFOMATION"); if(@Temp != StringEmpty()) { tbNo.CValue = @Temp; UpdateForm(false, ""); if(Search("SearchLocationWithNo", tbNo.CValue)) { ChangeMode("View"); } } UpdateForm(false, "cbSubjection"); Search("SearchAllLocation"); UpdateForm(true, "cbSubjection"); if(Search("SearchLocationFirst", tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchLocationPrevious", tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchLocationNext", tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchLocationLast", tbNo.CValue)) { ChangeMode("View"); } ; ChangeMode("Search"); ChangeMode("Modify"); if(Search("SearchSubLocation", tbNo.CValue)) { if(MessageBox("该库位有下属库位,若删除此库位资料其所有下属库位的资料均会被删除,确定要删除此库位资料吗?",@Title,MB_YESNO)==DialogResult("YES")) { Delete(); ChangeMode("Search"); } } else { Delete(); ChangeMode("Search"); } PrintReport(); ; ; ; ; ; if(toolBar.ExpandForm==true) { pnRight.Visible=true; } else { pnRight.Visible=false; } if( !Equals(LocationTree.SelectNodeNo, tbNo.CValue) ) { ChangeMode("Search"); tbNo.CValue = LocationTree.SelectNodeNo; ActiveControlEvent("tbNo", "Enter"); } ; ;
Empty(); NewInstance(); tbNo.ReadOnly=false; txtName.ReadOnly=true; txtComment.ReadOnly=true; cbSubjection.Enabled=false; toolBar.EnableSubmit=false; toolBar.EnableModify=false; toolBar.EnableDelete=false; toolBar.EnablePrint=false; #Location.CreateDate_Location=DBNull(); #Location.LastModDate_Location=DBNull(); #Location.LastModUser_Location=DBNull(); UpdateForm(true, ""); tbNo.Focus(); @Status=0; tbNo.ReadOnly=true; txtName.ReadOnly=false; txtComment.ReadOnly=false; cbSubjection.Enabled=true; toolBar.EnableSubmit=GetRight(@Title,"新增"); toolBar.EnableModify=false; toolBar.EnableDelete=false; toolBar.EnablePrint=false; #Location.SubjectionID_Location=DBNull(); #Location.ID_Location=NewGuid(); #Location.No_Location=tbNo.CValue; #Location.CreateName=GetCurrentUser(); #Location.ID_Creator=GetLoginUserID(); #Location.CreateDate_Location=DateTimeNow(); #Location.LastModDate_Location=DBNull(); #Location.LastModUser_Location=DBNull(); #Location.SuspendDate_Location=DBNull(); UpdateForm(true, ""); txtName.Focus(); @Status=1; tbNo.ReadOnly=false; txtName.ReadOnly=true; txtComment.ReadOnly=true; cbSubjection.Enabled=false; toolBar.EnableSubmit=false; toolBar.EnablePrint=GetRight(@Title,"打印"); toolBar.EnableModify=GetRight(@Title,"修改"); toolBar.EnableDelete=GetRight(@Title,"删除"); UpdateForm(true, ""); @Status=2; tbNo.ReadOnly=true; txtName.ReadOnly=false; txtComment.ReadOnly=false; cbSubjection.Enabled=false; toolBar.EnableSubmit=GetRight(@Title,"新增"); toolBar.EnableModify=false; toolBar.EnableDelete=GetRight(@Title,"删除"); toolBar.EnablePrint=false; #Location.LastModDate_Location=DateTimeNow(); #Location.LastModUser_Location=GetLoginUserID(); #Location.LastModUser_LocationName=GetCurrentUser(); UpdateForm(true, ""); txtName.Focus(); @Status=3; = #LocationLevelByName.LocationLevel_SystemSetting) { if(MessageBox("库位级别超出系统启用设置中的级别确定要提交吗?",@Title,MB_YESNO) ==DialogResult("NO")) return; } } if(@Status==1) { New(); } if(@Status == 3) { #Location.LastModDate_Location=DateTimeNow(); Update(); } ChangeMode("View"); ]]>