[求助]急需修改这段代码,请大家帮帮忙
public string str_userName; //用户名(登陆传过来的)public string str_SIM;
public string str_name; //姓名(查询页面穿过来的)
public string str_sex; //性别(查询页面穿过来的)
public Frm_StudentInfoManagement(string str) //按用户名重载
{
str_userName = str;
InitializeComponent();
}
public Frm_StudentInfoManagement(int intNO) //按学号重载
{
int_studentsNumber = intNO;
InitializeComponent();
}
public Frm_StudentInfoManagement(string strName,string strSex) //按姓名,性别重载
{
str_name = strName;
str_sex= strSex;
InitializeComponent();
}
private void SIM_select() //学生信息查询条件
{
if (int_studentsNumber == 0) //没有传过来学号
{
if (str_name == "" && str_sex == "") //姓名,性别为空
{
str_SIM = "1";
}
else if (str_name != "" && str_sex == "") //姓名不为空&&性别为空
{
str_SIM = "2";
}
else if (str_name != "" && str_sex != "") //姓名不为空&&性别不为空
{
str_SIM = "3";
}
}
else
{
str_SIM = "4";
}
}
得到的值为什么是3
[[it] 本帖最后由 sun_life 于 2008-11-13 10:34 编辑 [/it]]