public string[] setAudiometryAppointmentContent(SaveAudiometryAppointmentContent AaSystemData)
    {
        string[] returnValue = new string[2];
        returnValue[0] = "0";
        returnValue[1] = "0";
        DataBase Base = new DataBase();
        using (SqlConnection Sqlconn = new SqlConnection(Base.GetConnString()))
        {
            try
            {
                StaffDataBase sDB = new StaffDataBase();
                List<string> CreateFileName = sDB.getStaffDataName(HttpContext.Current.User.Identity.Name);
                Sqlconn.Open();
                string sql = "UPDATE AudiometryAppointment SET CheckContent=@aContent WHERE ID=@aID AND isDeleted=0";
                SqlCommand cmd = new SqlCommand(sql, Sqlconn);
                cmd.Parameters.Add("@aID", SqlDbType.BigInt).Value = AaSystemData.aID;
                cmd.Parameters.Add("@aContent", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(AaSystemData.aContent);
                returnValue[0] = cmd.ExecuteNonQuery().ToString();
                Sqlconn.Close();
            }
            catch (Exception e)
            {
                returnValue[0] = "-1";
                returnValue[1] = e.Message.ToString();
            }

        }
        return returnValue;
    }
示例#2
0
 public string[] setAudiometryAppointmentContent(SaveAudiometryAppointmentContent AaSystemData)
 {
     Audiometry aDB = new Audiometry();
     if (int.Parse(aDB._StaffhaveRoles[1]) == 1)
     {
         return aDB.setAudiometryAppointmentContent(AaSystemData);
     }
     else
     {
         return new string[2] { _noRole, _errorMsg };
     }
 }