private void SName_Click(object sender, EventArgs e) { SName.ForeColor = Color.Black; if (SName.Text == "Name") { SName.Clear(); } if (Surname.Text == "") { Surname.Text = "Surname"; Surname.ForeColor = Color.Silver; } if (Email.Text == "") { Email.Text = "Email"; Email.ForeColor = Color.Silver; } if (Password.Text == "") { Password.Text = "Password"; Password.ForeColor = Color.Silver; progressBar.Value = 0; lblPasswordStrong.Text = ""; } if (Photo.Text == "") { Photo.Text = "Upload a file"; Photo.ForeColor = Color.Silver; } }
public void GleicheBestandsListeMitZensosListeAb(TObjZensosListe ZensosObjekt) { List <String> IDSchuelerListe = new List <string> { }; ListeDerSchuelerDieNichtInZensosListeEnthaltenSind.Clear(); foreach (List <String> Eintrag in SchuelerListe) { String IDName = Eintrag[2] + ", " + Eintrag[3]; IDSchuelerListe.Add(IDName); } if (ZensosObjekt.ListeDerSchuelerDieNichtInBestandsListeEnthaltenSind != null) { ZensosObjekt.ListeDerSchuelerDieNichtInBestandsListeEnthaltenSind.Clear(); } ZensosObjekt.ListeDerSchuelerDieNichtInBestandsListeEnthaltenSind = ZensosObjekt.BestimmeSchuelerDieNichtInAndererListeEnthaltenSind(SchuelerListe); if (ZensosObjekt.ListeDerSchuelerMitKlassenwechselInZensosListe != null) { ZensosObjekt.ListeDerSchuelerMitKlassenwechselInZensosListe.Clear(); } ZensosObjekt.ListeDerSchuelerMitKlassenwechselInZensosListe = ZensosObjekt.BestimmeSchuelerMitVeraenderungenInAndererSchuelerListe(SchuelerListe); ListeDerSchuelerDieNichtInZensosListeEnthaltenSind = BestimmeSchuelerDieNichtInAndererListeEnthaltenSind(ZensosObjekt.SchuelerListe); foreach (List <String> Eintrag in ListeDerSchuelerDieNichtInZensosListeEnthaltenSind) { Int32 SPos = SchuelerListe.IndexOf(Eintrag); if (SPos > -1) { SchuelerListe[SPos][6] = "FALSCH"; } } foreach (List <String> Eintrag in ZensosObjekt.ListeDerSchuelerMitKlassenwechselInZensosListe) { String VName = Eintrag[2] + ", " + Eintrag[3]; Int32 i = -1; foreach (String SName in IDSchuelerListe) { i++; if (SName.Contains(VName) || VName.Contains(SName)) { SchuelerListe[i][0] = Eintrag[0]; SchuelerListe[i][1] = Eintrag[1]; } } } AktualisiereSchuelerUndKlassenListen(); }
private void Clear_Click(object sender, EventArgs e) { SName.Text = "Name"; SName.ForeColor = Color.Silver; Surname.Text = "Surname"; Surname.ForeColor = Color.Silver; Email.Text = "Email"; Email.ForeColor = Color.Silver; Password.Text = "Password"; Password.ForeColor = Color.Silver; progressBar.Value = 0; lblPasswordStrong.Text = ""; CityList.Text = "ADANA"; Photo.Text = "Upload a file"; Photo.ForeColor = Color.Silver; pictureBox.Image = null; SName.Focus(); }
public int CompareTo(Spell compareSpell) { // A null value means that this object is greater. if (compareSpell == null) { return(1); } else { return(SName.CompareTo(compareSpell.SName)); } }
public ProfileItemListView() { InitializeComponent(); Fname.Completed += (sender, e) => { SName.Focus(); }; SName.Completed += (sender, e) => { MobNumber.Focus(); }; MobNumber.Completed += (sender, e) => { Email.Focus(); }; }
private void OnRecvName(IChannel channel, Message message) { Console.WriteLine(string.Format("send to fortend ")); Debug.Log("send to fortend"); SName msg = message as SName; NetworkEntity self = networkEntities[World.Instance.tempID]; PlayerController controller = self.gameObject.GetComponent <PlayerController>(); if (controller == null) { return; } //this.gameObject.GetComponent<Text>().text = World.Instance.selfName; GameObject.Find("Ellen(Clone)").GetComponent <Text>().text = World.Instance.tempname; }
private void OnRecvName(IChannel channel, Message message) { Console.WriteLine(string.Format("Name send to backend start")); CName request = message as CName; //Player player = (Player)World.Instance.GetEntity(request.entityid); SName response = new SName(); //response.entityid = request.entityid; //response.self = request.self;//不能传到后端 //channel.Send(response); //player.Broadcast(response, true); World.Instance.Broundcast(response); Console.WriteLine(string.Format("send to backend sucess")); }
internal void Encode(AsnWriter writer, Asn1Tag tag) { writer.PushSequence(tag); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); writer.WriteInteger(TicketNumber); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); writer.WriteCharacterString(UniversalTagNumber.GeneralString, Realm); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 2)); SName?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 2)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 3)); EncryptedPart?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 3)); writer.PopSequence(tag); }
void SaleGenerateId() { string OID = "SELECT SALE_ID FROM SALE ORDER BY SALE_ID"; string SName; int SID; string format = "0000000"; SqlDataAdapter adSale = new SqlDataAdapter(OID, consql); DataSet dsSale = new DataSet(); adSale.Fill(dsSale, "Sale"); if (dsSale.Tables["Sale"].Rows.Count > 0) { SName = dsSale.Tables["Sale"].Rows[dsSale.Tables["Sale"].Rows.Count - 1][0].ToString(); SID = int.Parse(SName.Substring(1, (SName.Length - 1))); saleID = "S" + ((SID + 1).ToString(format)); } else { saleID = "S0000001"; } }
void ID() { string OID = "select STAFF_ID from STAFF ORDER BY STAFF_ID"; string SName; int SID; string format = "0000000"; SqlDataAdapter ad = new SqlDataAdapter(OID, consql); DataSet ds = new DataSet(); ad.Fill(ds, "STAFF"); if (ds.Tables["STAFF"].Rows.Count > 0) { SName = ds.Tables["STAFF"].Rows[ds.Tables["STAFF"].Rows.Count - 1][0].ToString(); SID = int.Parse(SName.Substring(1, (SName.Length - 1))); staffID = "S" + ((SID + 1).ToString(format)); } else { staffID = "S0000001"; } }
void damageGenerateId() { string OID = "SELECT DEMAGE_ID FROM DAMAGE ORDER BY DEMAGE_ID"; string SName; int SID; string format = "0000000"; SqlDataAdapter adSale = new SqlDataAdapter(OID, conSql); DataSet dsSale = new DataSet(); adSale.Fill(dsSale, "Damage"); if (dsSale.Tables["Damage"].Rows.Count > 0) { SName = dsSale.Tables["Damage"].Rows[dsSale.Tables["Damage"].Rows.Count - 1][0].ToString(); SID = int.Parse(SName.Substring(1, (SName.Length - 1))); DamageID = "D" + ((SID + 1).ToString(format)); } else { DamageID = "D0000001"; } }
public HttpResponseMessage GetSearchResult(object data) { var db = DbUtils.GetDBConnection(); db.Connection.Open(); IEnumerable <IDictionary <string, object> > response = null; var jsonData = JsonConvert.SerializeObject(data); var dictJson = JsonConvert.DeserializeObject <Dictionary <string, object> >(jsonData); object actionObject; dictJson.TryGetValue("actionName", out actionObject); string Action = actionObject.ToString(); string input_queryapi = ""; object userName; dictJson.TryGetValue("queried_by_username", out userName); if (Action.Equals("GetTableSchema")) { object tableName; dictJson.TryGetValue("TableName", out tableName); input_queryapi = tableName.ToString(); response = db.Query("INFORMATION_SCHEMA.COLUMNS").Select("COLUMN_NAME").WhereRaw("TABLE_NAME = ?", tableName).Get().Cast <IDictionary <string, object> >(); return(Request.CreateResponse(HttpStatusCode.OK, response)); } if (Action.Equals("GetInstructorByName")) { object empName; dictJson.TryGetValue("EmpName", out empName); input_queryapi = empName.ToString(); response = db.Query("Employee").WhereRaw("lower(EmpName) = ?", empName).Get().Cast <IDictionary <string, object> >(); //response = db.Query("Employee").WhereRaw("lower(EmpName) = ?", "dr. abdul aziz").Get().Cast<IDictionary<string, object>>(); } else if (Action.Equals("GetInstructorByEmail")) { object email; dictJson.TryGetValue("Email", out email); input_queryapi = email.ToString(); response = db.Query("Employee").WhereRaw("lower(Email) = ?", email).Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetInstructorByRank")) { object designationTitle; dictJson.TryGetValue("DesignationTitle", out designationTitle); input_queryapi = designationTitle.ToString(); response = db.Query("Employee").Join("Designation", "Employee.DesignationID", "Designation.DesignationID").Where("DesignationTitle", designationTitle).Get().Cast <IDictionary <string, object> >(); //get product by id=1 } else if (Action.Equals("GetInstructorByDepartment")) { object departmentID; dictJson.TryGetValue("DepartmentID", out departmentID); input_queryapi = departmentID.ToString(); response = db.Query("Employee").Join("Department", "Employee.DepartmentID", "Department.DepartmentID").Where("Department.DepartmentID", departmentID).Get().Cast <IDictionary <string, object> >(); //get product by id=1 } else if (Action.Equals("GetInstructorByNameStartsWith")) { object startNamePrefix; dictJson.TryGetValue("EmpName", out startNamePrefix); string prefixString = startNamePrefix.ToString() + "%"; input_queryapi = startNamePrefix.ToString(); response = db.Query("Employee").WhereLike("EmpName", prefixString).Get().Cast <IDictionary <string, object> >(); //get product by id=1 } else if (Action.Equals("GetInstructorByNameContains")) { object startNamePrefix; dictJson.TryGetValue("EmpName", out startNamePrefix); string prefixString = "%" + startNamePrefix.ToString() + "%"; input_queryapi = startNamePrefix.ToString(); response = db.Query("Employee").WhereLike("EmpName", prefixString).Get().Cast <IDictionary <string, object> >(); //get product by id=1 } else if (Action.Equals("GetInstructorByCourseName")) { object courseName; dictJson.TryGetValue("CourseName", out courseName); input_queryapi = courseName.ToString(); response = db.Query("Employee").Join("CourseFaculty", "Employee.EmpID", "CourseFaculty.EmpID").Join("CourseOffered", "CourseOffered.CourseOfferedID", "CourseFaculty.CourseOfferedID").Join("Course", "CourseOffered.CourseID", "Course.CourseID").Where("CourseName", courseName).Get().Cast <IDictionary <string, object> >(); //get product by id=1 } else if (Action.Equals("GetInstructorByCourseCode")) { object courseCode; dictJson.TryGetValue("CourseCode", out courseCode); input_queryapi = courseCode.ToString(); response = db.Query("Employee").Join("CourseFaculty", "Employee.EmpID", "CourseFaculty.EmpID").Join("CourseOffered", "CourseOffered.CourseOfferedID", "CourseFaculty.CourseOfferedID").Join("Course", "CourseOffered.CourseID", "Course.CourseID").Where("CourseCode", courseCode).Get().Cast <IDictionary <string, object> >(); //get product by id=1 } else if (Action.Equals("GetCoursesTaughtByASpecificInstructor")) { object EmpName; dictJson.TryGetValue("EmpName", out EmpName); input_queryapi = EmpName.ToString(); response = db.Query("Semester").Select("CourseName").Join("CourseOffered", "Semester.SemesterID", "CourseOffered.SemesterID").Join("Course", "Course.CourseID", "CourseOffered.CourseID") .Join("CourseFaculty", "CourseFaculty.CourseOfferedID", "CourseOffered.CourseOfferedID") .Join("Employee", "Employee.EmpID", "CourseFaculty.EmpID") .Where("EmpName", EmpName).Get().Cast <IDictionary <string, object> >(); //get product by id=1 } else if (Action.Equals("GetCoursesTaughtByAInstructorInAParticularSemester")) { object semesterName; object empName; dictJson.TryGetValue("EmpName", out empName); dictJson.TryGetValue("SemesterName", out semesterName); input_queryapi = empName.ToString() + " " + semesterName.ToString(); response = db.Query("Semester").Join("CourseOffered", "Semester.SemesterID", "CourseOffered.SemesterID").Join("Course", "Course.CourseID", "CourseOffered.CourseID") .Join("CourseFaculty", "CourseFaculty.CourseOfferedID", "CourseOffered.CourseOfferedID") .Join("Employee", "Employee.EmpID", "CourseFaculty.EmpID") .Where("SemesterName", semesterName) .Where("EmpName", empName).Get().Cast <IDictionary <string, object> >(); //get product by id=1 } // STUDENT QUERIES else if (Action.Equals("GetStudentByName")) { object SName; dictJson.TryGetValue("SName", out SName); input_queryapi = SName.ToString(); response = db.Query("Student").WhereRaw("lower(SName) = ?", SName).Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetStudentByStudentID")) { object RollNumber; dictJson.TryGetValue("RollNumber", out RollNumber); input_queryapi = RollNumber.ToString(); response = db.Query("Student").WhereRaw("lower(RollNumber) = ?", RollNumber).Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetStudentByBatchID")) { object BatchID; dictJson.TryGetValue("BatchID", out BatchID); input_queryapi = BatchID.ToString(); response = db.Query("Student").WhereRaw("BatchID = ?", BatchID).Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetStudentsByDepartment")) { object DepartmentName; dictJson.TryGetValue("DepartmentName", out DepartmentName); input_queryapi = DepartmentName.ToString(); response = db.Query("Student").Join("Programme", "Programme.ProgrammeID", "Student.ProgrammeID").Join("Department", "Department.DepartmentID", "Programme.DepartmentID") .Where("DepartmentName", DepartmentName).Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetStudentsBySection")) { object SectionName; dictJson.TryGetValue("SectionName", out SectionName); input_queryapi = SectionName.ToString(); response = db.Query("Student").Join("Section", "Section.BatchID", "Student.BatchID") .Where("SectionName", SectionName).Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetStudentByNUEmail")) { object Email; dictJson.TryGetValue("Email", out Email); input_queryapi = Email.ToString(); response = db.Query("Student").Join("CandidateStudent", "CandidateStudent.CandidateID", "Student.CandidateID") .Where("Student.Email", Email).Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetStudentByPrimaryEmail")) { object Email; dictJson.TryGetValue("Email", out Email); input_queryapi = Email.ToString(); response = db.Query("Student").Join("CandidateStudent", "CandidateStudent.CandidateID", "Student.CandidateID") .Where("CandidateStudent.Email", Email).Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetStudentsByNameStartsWith")) { object startNamePrefix; dictJson.TryGetValue("Sname", out startNamePrefix); input_queryapi = startNamePrefix.ToString(); string prefixString = startNamePrefix.ToString() + "%"; response = db.Query("Student").WhereLike("Sname", prefixString).Get().Cast <IDictionary <string, object> >(); //get product by id=1 } else if (Action.Equals("GetStudentsByNameContains")) { object startNamePrefix; dictJson.TryGetValue("EmpName", out startNamePrefix); input_queryapi = startNamePrefix.ToString(); string prefixString = "%" + startNamePrefix.ToString() + "%"; response = db.Query("Student").WhereLike("Sname", prefixString).Get().Cast <IDictionary <string, object> >(); //get product by id=1 } else if (Action.Equals("GetStudentsByCourseName")) { object CourseName; dictJson.TryGetValue("CourseName", out CourseName); input_queryapi = CourseName.ToString(); response = db.Query("Student").Join("CourseEnrollment", "CourseEnrollment.StudentID", "Student.StudentID").Join("Course", "Course.CourseID", "CourseEnrollment.CourseID") .Where("CourseName", CourseName).Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetStudentsByCourseCode")) { object CourseCode; dictJson.TryGetValue("CourseCode", out CourseCode); input_queryapi = CourseCode.ToString(); response = db.Query("Student").Join("CourseEnrollment", "CourseEnrollment.StudentID", "Student.StudentID").Join("Course", "Course.CourseID", "CourseEnrollment.CourseID") .Where("CourseCode", CourseCode).Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetStudentsBySkill")) { response = db.Query("StudentSkills").Join("Skill", "Skill.SkillID", "StudentSkills.SkillID").Join("Student", "StudentSkills.StudentID", "Student.StudentID") .Get().Cast <IDictionary <string, object> >(); } else if (Action.Equals("GetStudentsByDomain")) { response = db.Query("Domain").Join("Skill", "Skill.DomainID", "Domain.DomainID").Join("StudentSkills", "StudentSkills.SkillID", "Skill.SkillID").Join("Student", "Student.StudentID", "StudentSkills.StudentID") .Get().Cast <IDictionary <string, object> >(); } //var db1 = DbUtils.GetDBConnection(); //db1.Connection.Open(); SqlConnection dbConnection = new SqlConnection(ConfigurationManager.AppSettings["SqlDBConn"].ToString()); try { /** * db1.Query("dbo.SearchLog").AsInsert(new * { * input_query = input_queryapi, * actionName = Action, * queried_by_username = userName.ToString() * }); **/ string query = "INSERT INTO dbo.SearchLog(input_query, actionName, queried_by_username) VALUES(@input_query,@actionName,@queried_by_username)"; using (SqlCommand command = new SqlCommand(query, dbConnection)) { command.Parameters.AddWithValue("@input_query", input_queryapi); command.Parameters.AddWithValue("@actionName", Action); command.Parameters.AddWithValue("@queried_by_username", userName.ToString()); dbConnection.Open(); int result = command.ExecuteNonQuery(); // Check Error if (result < 0) { Console.WriteLine("Error inserting data into Database!"); } } } catch (Exception e) { } return(Request.CreateResponse(HttpStatusCode.OK, response)); }
internal void Encode(AsnWriter writer, Asn1Tag tag) { writer.PushSequence(tag); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); writer.WriteInteger(ProtocolVersionNumber); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); writer.WriteInteger((long)MessageType); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); if (Asn1Extension.HasValue(CTime)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 2)); writer.WriteGeneralizedTime(CTime.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 2)); } if (Asn1Extension.HasValue(Cusec)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 3)); writer.WriteInteger(Cusec.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 3)); } writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 4)); writer.WriteGeneralizedTime(STime); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 4)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 5)); writer.WriteInteger(Susc); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 5)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 6)); writer.WriteInteger((long)ErrorCode); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 6)); if (Asn1Extension.HasValue(CRealm)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 7)); writer.WriteCharacterString(UniversalTagNumber.GeneralString, CRealm); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 7)); } if (Asn1Extension.HasValue(CName)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 8)); CName?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 8)); } writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 9)); writer.WriteCharacterString(UniversalTagNumber.GeneralString, Realm); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 9)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 10)); SName?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 10)); if (Asn1Extension.HasValue(EText)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 11)); writer.WriteCharacterString(UniversalTagNumber.GeneralString, EText); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 11)); } if (Asn1Extension.HasValue(EData)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 12)); writer.WriteOctetString(EData.Value.Span); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 12)); } writer.PopSequence(tag); }
internal void Encode(AsnWriter writer, Asn1Tag tag) { writer.PushSequence(tag); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); Key?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); writer.PushSequence(); for (int i = 0; i < LastReq.Length; i++) { LastReq[i]?.Encode(writer); } writer.PopSequence(); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 2)); writer.WriteInteger(Nonce); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 2)); if (Asn1Extension.HasValue(KeyExpiration)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 3)); writer.WriteGeneralizedTime(KeyExpiration.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 3)); } writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 4)); writer.WriteBitString(Flags.AsReadOnly()); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 4)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 5)); writer.WriteGeneralizedTime(AuthTime); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 5)); if (Asn1Extension.HasValue(StartTime)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 6)); writer.WriteGeneralizedTime(StartTime.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 6)); } writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 7)); writer.WriteGeneralizedTime(EndTime); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 7)); if (Asn1Extension.HasValue(RenewTill)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 8)); writer.WriteGeneralizedTime(RenewTill.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 8)); } writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 9)); writer.WriteCharacterString(UniversalTagNumber.GeneralString, Realm); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 9)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 10)); SName?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 10)); if (Asn1Extension.HasValue(CAddr)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 11)); writer.PushSequence(); for (int i = 0; i < CAddr.Length; i++) { CAddr[i]?.Encode(writer); } writer.PopSequence(); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 11)); } if (Asn1Extension.HasValue(EncryptedPaData)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 12)); EncryptedPaData?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 12)); } writer.PopSequence(tag); }
internal void Encode(AsnWriter writer, Asn1Tag tag) { writer.PushSequence(tag); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); writer.WriteBitString(KdcOptions.AsReadOnlySpan()); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); if (Asn1Extension.HasValue(CName)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); CName?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); } writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 2)); writer.WriteCharacterString(UniversalTagNumber.GeneralString, Realm); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 2)); if (Asn1Extension.HasValue(SName)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 3)); SName?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 3)); } if (Asn1Extension.HasValue(From)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 4)); writer.WriteGeneralizedTime(From.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 4)); } writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 5)); writer.WriteGeneralizedTime(Till); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 5)); if (Asn1Extension.HasValue(RTime)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 6)); writer.WriteGeneralizedTime(RTime.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 6)); } writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 7)); writer.WriteInteger(Nonce); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 7)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 8)); writer.PushSequence(); for (int i = 0; i < EType.Length; i++) { writer.WriteInteger((long)EType[i]); } writer.PopSequence(); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 8)); if (Asn1Extension.HasValue(Addresses)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 9)); writer.PushSequence(); for (int i = 0; i < Addresses.Length; i++) { Addresses[i]?.Encode(writer); } writer.PopSequence(); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 9)); } if (Asn1Extension.HasValue(EncAuthorizationData)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 10)); EncAuthorizationData?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 10)); } if (Asn1Extension.HasValue(AdditionalTickets)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 11)); writer.PushSequence(); for (int i = 0; i < AdditionalTickets.Length; i++) { AdditionalTickets[i]?.Encode(writer); } writer.PopSequence(); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 11)); } writer.PopSequence(tag); }
private void SContactNo_TextChanged(object sender, EventArgs e) { sRegNo.Clear(); SName.Clear(); display(); }
public override string ToString() { return(LastName.ToString() + " " + SName.ToString() + ", " + Course.ToString() + " курс"); }
internal void Encode(AsnWriter writer, Asn1Tag tag) { writer.PushSequence(tag); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); Key?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); if (Asn1Extension.HasValue(Realm)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); writer.WriteCharacterString(UniversalTagNumber.GeneralString, Realm); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); } if (Asn1Extension.HasValue(PName)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 2)); PName?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 2)); } writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 3)); writer.WriteBitString(Flags.AsReadOnly()); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 3)); if (Asn1Extension.HasValue(AuthTime)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 4)); writer.WriteGeneralizedTime(AuthTime.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 4)); } if (Asn1Extension.HasValue(StartTime)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 5)); writer.WriteGeneralizedTime(StartTime.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 5)); } if (Asn1Extension.HasValue(EndTime)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 6)); writer.WriteGeneralizedTime(EndTime.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 6)); } if (Asn1Extension.HasValue(RenewTill)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 7)); writer.WriteGeneralizedTime(RenewTill.Value); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 7)); } if (Asn1Extension.HasValue(SRealm)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 8)); writer.WriteCharacterString(UniversalTagNumber.GeneralString, SRealm); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 8)); } if (Asn1Extension.HasValue(SName)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 9)); SName?.Encode(writer); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 9)); } if (Asn1Extension.HasValue(AuthorizationData)) { writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 10)); writer.PushSequence(); for (int i = 0; i < AuthorizationData.Length; i++) { AuthorizationData[i]?.Encode(writer); } writer.PopSequence(); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 10)); } writer.PopSequence(tag); }
public override int GetHashCode() { return(LastName.GetHashCode() + SName.GetHashCode() + Course.GetHashCode()); }