private void button4_Click_1(object sender, EventArgs e) { create_account ca = new create_account(); ca.Show(); this.Hide(); //Application.Exit(); }
private void roundButton2_Click(object sender, EventArgs e) { create_account c = new create_account(); c.Show(); this.Hide(); }
private void dateTimePicker1_Leave(object sender, EventArgs e) { try { var httpWebRequest = (HttpWebRequest)WebRequest.Create(GlobalClass.url + "/add_acc_validity_date/"); httpWebRequest.ContentType = "application/json"; httpWebRequest.Method = "POST"; httpWebRequest.CookieContainer = new CookieContainer(); httpWebRequest.CookieContainer.Add(new Uri(GlobalClass.url + "/add_acc_validity_date/"), new Cookie("sessionid", GlobalClass.session)); using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) { string json = "{\"start_year\":" + dateTimePicker1.Text + "}";//"}]} streamWriter.Write(json); streamWriter.Flush(); streamWriter.Close(); } var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse(); using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) { var result = streamReader.ReadToEnd(); //MessageBox.Show(result); JToken jt = JToken.Parse(result); if (Convert.ToString(jt["status"]) == "False") { MessageBox.Show(Convert.ToString(jt["validation"]),"Please Select Again",MessageBoxButtons.RetryCancel,MessageBoxIcon.Error); start_date.Text = start_month.Text = end_date.Text = end_month.Text = ""; dateTimePicker1.Focus(); } else { MessageBox.Show(Convert.ToString(jt["validation"]),"Success",MessageBoxButtons.OK,MessageBoxIcon.Information); this.Hide(); create_account c = new create_account(); c.Show(); c.Enabled = true; c.Activate(); } //if (result.Substring(11, 4) == "true") //{ // MessageBox.Show("User Registered successfully. Your User name is" + " " + new_username.Text + ".", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); // return; //} //else //{ // MessageBox.Show(result.Substring(33), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); // //CleanForm(); // //new_username.Focus(); //} } } catch { MessageBox.Show("No responce from server"); } }
private void btnAccAdd_Click(object sender, EventArgs e) { while (ActiveMdiChild != null) ActiveMdiChild.Close(); create_account newAcc = new create_account(); newAcc.Location = new Point(280, 130); newAcc.MdiParent = this; newAcc.Show(); }
private void addNewUserToolStripMenuItem_Click(object sender, EventArgs e) { create_account f1 = new create_account(); f1.Show(); this.Hide(); }