哪位大侠帮忙翻译下下ASP.net的这些代码的注释
publicpartialclassbasic_SetFlows:System.Web.UI.Page{protectedvoidPage_Load(objectsend...
public partial class basic_SetFlows : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LinqDataSource1.DataBind();
ddldept.DataBind();
ListItem item = new ListItem();
item.Text = "请选择";
item.Value = "";
ddldept.Items.Insert(0,item);
}
}
protected void ddldept_SelectedIndexChanged(object sender, EventArgs e)
{
lLift.Items.Clear();
if (!ddldept.SelectedValue.ToString().Trim().Equals(""))
{
int dept_id = int.Parse(ddldept.SelectedValue.ToString());
P_UsersDataContext dc = new P_UsersDataContext();
var ts = from tt in dc.P_Users where tt.u_dep == dept_id select tt;
foreach (var gs in ts)
{
lLift.Items.Add(gs.u_realname.ToString().Trim() + "(" + gs.id.ToString().Trim()+")");
}
}
}
protected void btnConfirm_Click(object sender, EventArgs e)
{
string str = "流程开始->";
if (lRight.Items.Count <= 0)
{
CSsystem.showMess("请设置工作流程!", "提示", "SetFlows.aspx");
return;
}
else
{
for (int i = 0; i < lRight.Items.Count; i++)
{
str += lRight.Items[i].Text.Trim()+"->";
}
str += "归档";
}
Jscript.CloseWindowReturnValues(str);
}
//向右选择
protected void btnRight_Click(object sender, EventArgs e)
{
if (lLift.SelectedIndex != -1)
{
bool IsEx = false;
for (int i = 0; i < lRight.Items.Count; i++)
{
if (lRight.Items[i].Text.Trim().Equals(lLift.SelectedItem.Text.ToString()))
{
IsEx = true;
}
}
if(IsEx==false)
lRight.Items.Add(lLift.SelectedItem.Text.ToString().Split('=').First());
}
}
//移除右边的选项
protected void btnLeft_Click(object sender, EventArgs e)
{
if (lRight.SelectedIndex != -1)
{
lRight.Items.RemoveAt(lRight.SelectedIndex);
}
}
} 展开
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LinqDataSource1.DataBind();
ddldept.DataBind();
ListItem item = new ListItem();
item.Text = "请选择";
item.Value = "";
ddldept.Items.Insert(0,item);
}
}
protected void ddldept_SelectedIndexChanged(object sender, EventArgs e)
{
lLift.Items.Clear();
if (!ddldept.SelectedValue.ToString().Trim().Equals(""))
{
int dept_id = int.Parse(ddldept.SelectedValue.ToString());
P_UsersDataContext dc = new P_UsersDataContext();
var ts = from tt in dc.P_Users where tt.u_dep == dept_id select tt;
foreach (var gs in ts)
{
lLift.Items.Add(gs.u_realname.ToString().Trim() + "(" + gs.id.ToString().Trim()+")");
}
}
}
protected void btnConfirm_Click(object sender, EventArgs e)
{
string str = "流程开始->";
if (lRight.Items.Count <= 0)
{
CSsystem.showMess("请设置工作流程!", "提示", "SetFlows.aspx");
return;
}
else
{
for (int i = 0; i < lRight.Items.Count; i++)
{
str += lRight.Items[i].Text.Trim()+"->";
}
str += "归档";
}
Jscript.CloseWindowReturnValues(str);
}
//向右选择
protected void btnRight_Click(object sender, EventArgs e)
{
if (lLift.SelectedIndex != -1)
{
bool IsEx = false;
for (int i = 0; i < lRight.Items.Count; i++)
{
if (lRight.Items[i].Text.Trim().Equals(lLift.SelectedItem.Text.ToString()))
{
IsEx = true;
}
}
if(IsEx==false)
lRight.Items.Add(lLift.SelectedItem.Text.ToString().Split('=').First());
}
}
//移除右边的选项
protected void btnLeft_Click(object sender, EventArgs e)
{
if (lRight.SelectedIndex != -1)
{
lRight.Items.RemoveAt(lRight.SelectedIndex);
}
}
} 展开
1个回答
2011-05-07
展开全部
//向右选择
应该是指你在页面上单机那个向右的按钮激发的时间,按钮的ID 应该是 btnRight
//移除右边的选项
就是字面上的意思
应该是指你在页面上单机那个向右的按钮激发的时间,按钮的ID 应该是 btnRight
//移除右边的选项
就是字面上的意思
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询