コード例 #1
0
ファイル: Program.cs プロジェクト: arsalanpeerzada/OOP
        static void Main(string[] args)
        {
            Console.Write("Enter Number A");
            int a = Convert.ToInt32(Console.ReadLine());

            Console.Write("Enter Number B");
            int b = Convert.ToInt32(Console.ReadLine());

            Console.Write("Enter Number C");
            int c = Convert.ToInt32(Console.ReadLine());

            My_Class me = new My_Class();

            me.greater(a, b, c);
        }
コード例 #2
0
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            if (Validate())
            {
                string nama     = string.Empty;
                string username = string.Empty;
                string pswd     = string.Empty;
                string email    = string.Empty;

                nama     = TxtNama.Text;
                username = TxtUsername.Text;
                pswd     = TxtPswd.Text;
                email    = TxtEmail.Text;

                //email notification
                My_Class mc    = new My_Class();
                string   Hasil = mc.emailnotification(email, "Username : "******"<br /> Password : "******"");
                if (Hasil == "OK")
                {
                    div1.Visible     = false;
                    div2.Visible     = true;
                    LblNama.Text     = nama;
                    LblUsername.Text = username;
                    LblPassword.Text = pswd;
                    LblEmail.Text    = email;
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Berhasil menyimpan !')", true);
                    Response.Write("<script language=javascript>alert('Username : "******" Password : "******"');</script>");
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Gagal menyimpan !')", true);
                    Response.Write("<script language=javascript>alert('Ada Error : " + Hasil + "');</script>");
                }
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Gagal menyimpan, Harap Centang Captcha !')", true);
                //lblmsg.Text = "Not Valid Recaptcha";
                //lblmsg.ForeColor = System.Drawing.Color.Red;
            }
        }