; ; @Temp = ShowSearchBox("RegionalLeaderSearch","INFOMATION",tbNo.CValue); if(@Temp != StringEmpty()) { tbNo.CValue = @Temp; UpdateForm(false, ""); if(Search("SearchRegionalLeaderWithNo",tbNo.CValue)) { ChangeMode("View"); } } @SetFlag=1; @temp = ShowSearchBox("EmployeeSearch","INFOMATION",#Principal.No_Employee); if(@temp != "") { ResumeColumnEvent("#Principal.No_Employee"); #Principal.No_Employee = @temp; ClearColumnEvent(); } @SetFlag=0; if(Search("SearchRegionalLeaderFirst", tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchRegionalLeaderPrevious", tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchRegionalLeaderNext", tbNo.CValue)) { ChangeMode("View"); } if(Search("SearchRegionalLeaderLast", tbNo.CValue)) { ChangeMode("View"); } ; ChangeMode("Search"); ChangeMode("Modify"); Delete(); ChangeMode("Search"); PrintReport(); ; ; ; ; ; if(@SetFlag==0) { return; } if(Search("GetEmployeeNameByNo",#Principal.No_Employee)) { #Principal.Name_Employee=#Employee.Name_Employee; #Principal.ID_Employee=#Employee.ID_Employee; if(!Equals(#Employee.SuspendDate_Employee,DBNull())) MessageBox("该员工已停用!",@Title); } else { MessageBox("该员工不存在!",@Title); #Principal.Name_Employee=""; #Principal.ID_Employee=GuidEmpty(); @temp = ShowSearchBox("EmployeeSearch","INFOMATION",#Principal.No_Employee); if(@temp != "") { ResumeColumnEvent("#Principal.No_Employee"); #Principal.No_Employee = @temp; ClearColumnEvent(); } }
if(GetRight("区域业务负责人","全权查看")) { FormatString(""); }
Empty(); NewInstance(); tbNo.ReadOnly=false; txtName.ReadOnly=true; dgEmployee.ReadOnly=true; toolBar.EnableSubmit=false; toolBar.EnableModify=false; toolBar.EnableDelete=false; toolBar.EnablePrint=false; UpdateForm(true, ""); tbNo.Focus(); @Status=0; Empty(); NewInstance(); tbNo.ReadOnly=true; txtName.ReadOnly=false; dgEmployee.ReadOnly=false; toolBar.EnableSubmit=GetRight(@Title,"新增"); toolBar.EnableModify=false; toolBar.EnableDelete=false; toolBar.EnablePrint=false; #RegionalLeader.No_RegionalLeader=tbNo.CValue; #RegionalLeader.ID_RegionalLeader=NewGuid(); UpdateForm(true, ""); txtName.Focus(); @Status=1; tbNo.ReadOnly=false; txtName.ReadOnly=true; dgEmployee.ReadOnly=true; toolBar.EnableSubmit=false; toolBar.EnableModify=GetRight(@Title,"修改"); toolBar.EnableDelete=GetRight(@Title,"删除"); toolBar.EnablePrint=GetRight(@Title,"打印"); UpdateForm(true, ""); @Status=2; tbNo.ReadOnly=true; txtName.ReadOnly=false; dgEmployee.ReadOnly=false; toolBar.EnableSubmit=GetRight(@Title,"新增"); toolBar.EnableModify=false; toolBar.EnableDelete=GetRight(@Title,"删除"); toolBar.EnablePrint=false; UpdateForm(true, ""); txtName.Focus(); @Status=3; =0;@i=@i-1) { SetPosition("#Principal", @i); if(Equals(#Principal.ID_Principal,GuidEmpty())) #Principal.ID_Principal = NewGuid(); if(Equals(#Principal.ID_Employee, GuidEmpty())) { dgEmployee.CurrentRowIndex=@i; tcOperMan.SelectedIndex=0; MessageBox("该员工不存在!",@Title); ResumeLayout(); return; } #Principal.ID_RegionalLeader = #RegionalLeader.ID_RegionalLeader; } ResumeLayout(); New(); } else if(@Status == 3) { SuspendLayout(); for(@i=RowCount("#Principal")-1;@i>=0;@i=@i-1) { SetPosition("#Principal", @i); if(Equals(#Principal.ID_Principal,GuidEmpty())) #Principal.ID_Principal = NewGuid(); if(Equals(#Principal.ID_Employee, GuidEmpty())) { dgEmployee.CurrentRowIndex=@i; tcOperMan.SelectedIndex=0; MessageBox("该员工不存在!",@Title); ResumeLayout(); return; } #Principal.ID_RegionalLeader = #RegionalLeader.ID_RegionalLeader; } ResumeLayout(); Update(); } ChangeMode("View"); ]]>