예제 #1
0
 public mainProcess(Objects.UserObject cUser,ref  List<Objects.MsgObject> list)
 {
     currentUser = cUser;
     mainProcess._globalMsgList = list;
     string userName = currentUser.FirstName + " " + currentUser.LastName;
     chatRobot = new msgCenter.Operators.ChatRobotOperator(userName);
 }
예제 #2
0
 public void getContacts()
 {
     contacts = new List<UserObject>();
     string sqltext = "select * from tb_User where ID in (select contactID from tb_Contacts where UID="+userID+")";
     DataSet ds = Operators.DBOperator.Acc_GetDataSet(sqltext);
     for (int i = 0; i < ds.Tables[0].Rows.Count; i++) {
         UserObject c = new UserObject();
         c.UserID = ds.Tables[0].Rows[i]["ID"].ToString();
         c.firstName = ds.Tables[0].Rows[i]["firstName"].ToString();
         c.midName = ds.Tables[0].Rows[i]["midName"].ToString();
         c.lastName = ds.Tables[0].Rows[i]["lastName"].ToString();
         c.suffx = ds.Tables[0].Rows[i]["suffx"].ToString();
         c.gender = ds.Tables[0].Rows[i]["gender"].ToString();
         c.address = ds.Tables[0].Rows[i]["address"].ToString();
         c.height =float.Parse(ds.Tables[0].Rows[i]["height"].ToString());
         c.weight =float.Parse(ds.Tables[0].Rows[i]["weight"].ToString());
         c.homePhone = ds.Tables[0].Rows[i]["homePhone"].ToString();
         c.otherInf = ds.Tables[0].Rows[i]["otherInf"].ToString();
         c.birthday = ds.Tables[0].Rows[i]["birthday"].ToString();
         c.state =ds.Tables[0].Rows[i]["State"].ToString();
         c.userType =int.Parse(ds.Tables[0].Rows[i]["UserType"].ToString());
         contacts.Add(c);
     }
 }
예제 #3
0
 public static UserObject GetLocalUser()
 {
     string sqltext = "select * from tb_User;";
     DataSet ds = Operators.DBOperator.Acc_GetDataSet(sqltext);
     UserObject c = new UserObject();
     c.UserID = ds.Tables[0].Rows[0]["ID"].ToString();
     c.firstName = ds.Tables[0].Rows[0]["firstName"].ToString();
     c.midName = ds.Tables[0].Rows[0]["midName"].ToString();
     c.lastName = ds.Tables[0].Rows[0]["lastName"].ToString();
     c.suffx = ds.Tables[0].Rows[0]["suffx"].ToString();
     c.gender = ds.Tables[0].Rows[0]["gender"].ToString();
     c.address = ds.Tables[0].Rows[0]["address"].ToString();
     c.height = float.Parse(ds.Tables[0].Rows[0]["height"].ToString());
     c.weight = float.Parse(ds.Tables[0].Rows[0]["weight"].ToString());
     c.homePhone = ds.Tables[0].Rows[0]["homePhone"].ToString();
     c.otherInf = ds.Tables[0].Rows[0]["otherInf"].ToString();
     c.birthday = ds.Tables[0].Rows[0]["birthday"].ToString();
     c.state = ds.Tables[0].Rows[0]["State"].ToString();
     c.userType = int.Parse(ds.Tables[0].Rows[0]["UserType"].ToString());
     return c;
 }
예제 #4
0
 public static UserObject GetUser()
 {
     string sqltext = "select * from tb_User;";
     DataSet ds = Operators.DBOperator.Acc_GetDataSet(sqltext);
     UserObject c = new UserObject();
     c.UserID = ds.Tables[0].Rows[0]["ID"].ToString();
     c.firstName = ds.Tables[0].Rows[0]["firstName"].ToString();
     c.midName = ds.Tables[0].Rows[0]["midName"].ToString();
     c.lastName = ds.Tables[0].Rows[0]["lastName"].ToString();
     c.suffx = ds.Tables[0].Rows[0]["suffx"].ToString();
     c.gender = ds.Tables[0].Rows[0]["gender"].ToString();
     c.address_street = ds.Tables[0].Rows[0]["street"].ToString();
     c.address_city = ds.Tables[0].Rows[0]["city"].ToString();
     c.address_state = ds.Tables[0].Rows[0]["state"].ToString();
     c.address_zipcode = ds.Tables[0].Rows[0]["zipcode"].ToString();
     c.height = ds.Tables[0].Rows[0]["height"].ToString();
     c.weight = ds.Tables[0].Rows[0]["weight"].ToString();
     c.homePhone = ds.Tables[0].Rows[0]["homePhone"].ToString();
     c.otherInf = ds.Tables[0].Rows[0]["otherInf"].ToString();
     c.birthday = ds.Tables[0].Rows[0]["birthday"].ToString();
     c.status = ds.Tables[0].Rows[0]["status"].ToString();
     c.userType = int.Parse(ds.Tables[0].Rows[0]["UserType"].ToString());
     c.emgName = ds.Tables[0].Rows[0]["EmgName"].ToString();
     c.emgPhone = ds.Tables[0].Rows[0]["EmgPhone"].ToString();
     c.useInsulin = bool.Parse(ds.Tables[0].Rows[0]["useInsulin"].ToString());
     return c;
 }