private void DistributorInfo_Load(object sender, EventArgs e) { Location = new System.Drawing.Point(-7, 50); int w = SystemInformation.VirtualScreen.Width + 14; int h = SystemInformation.VirtualScreen.Height - 43; Size = new Size(w, h); using (MainService.MainServiceClient client = new MainService.MainServiceClient()) { MainService.DistributorUser user = client.GetDistributor(); textBox2.Text = user.AgencyName; textBox12.Text = user.DistributorCode.ToString(); textBox16.Text = user.DistributorName; textBox3.Text = user.PANnumber; textBox14.Text = user.GSTIN; textBox13.Text = user.Address; textBox4.Text = user.City; textBox15.Text = user.Taluka; textBox5.Text = user.District; textBox6.Text = user.State; textBox7.Text = user.LicenceIssueDate.ToString(); textBox8.Text = user.LicenceExpiryDate.ToString(); textBox9.Text = user.ContectNo; textBox10.Text = user.Email; } }
public ActionResult Index() { ViewBag.Title = "Home Page"; using (var client = new MainService.MainServiceClient()) { var names = client.GetNames(""); ViewBag.Names = names.ToList(); } return(View()); }
private void button1_Click(object sender, EventArgs e) { if (textBox2.Text.Length >= 8 && textBox3.Text.Length >= 8) { using (MainService.MainServiceClient client = new MainService.MainServiceClient()) { string oldpass = client.GetPassword(292029); if (oldpass.Equals(textBox1.Text)) { if (textBox2.Text.Equals(textBox3.Text)) { var msg = client.SetPassword(textBox2.Text, 292029); if (msg.Equals("OK")) { MessageBox.Show("Successfully Updated Password!!!"); textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; } else { MessageBox.Show("Something went wrong!!!"); } } else { MessageBox.Show("New Password and Conform New Password are not same!!!"); } } else { MessageBox.Show("Old Password is not correct!!!"); } } } else { MessageBox.Show("Password must be of minimum 8 charactors!!!"); } }