Exemplo n.º 1
0
        private void Form_Detail_Load(object sender, EventArgs e)
        {
            this.ControlBox = false;

            user_log = frmlog.getusername();
            if (fromasal.Equals("form_awal"))
            {
                idpost    = frmawal.getid();
                user_post = frmawal.getuser();
            }
            else if (fromasal.Equals("form_order"))
            {
                idpost = frmor.getid();
            }

            ArrayList xx = control.getPostDetail(idpost);

            pbFoto.Image     = (Image)xx[0];
            lblJudul.Text    = xx[1].ToString();
            tbTgl.Text       = xx[2].ToString();
            tbStok.Text      = xx[3].ToString();
            tbLokasi.Text    = xx[4].ToString();
            tbHarga.Text     = xx[5].ToString();
            tbDesk.Text      = xx[6].ToString();
            tbHasil.Text     = xx[7].ToString();
            tbProv.Text      = xx[8].ToString();
            tbKota.Text      = xx[9].ToString();
            lblUsername.Text = xx[10].ToString();

            if (user_post.Equals(user_log))
            {
                this.btnOrder.Visible  = false;
                this.btnOrder.Enabled  = false;
                this.btnEdit.Visible   = true;
                this.btnEdit.Enabled   = true;
                this.btnDelete.Visible = true;
                this.btnDelete.Enabled = true;
            }
            else
            {
                this.btnOrder.Visible  = true;
                this.btnOrder.Enabled  = true;
                this.btnEdit.Visible   = false;
                this.btnEdit.Enabled   = false;
                this.btnDelete.Visible = false;
                this.btnDelete.Enabled = false;
            }
        }
Exemplo n.º 2
0
        private void Form_UpdatePost_Load(object sender, EventArgs e)
        {
            idpost = frmawal.getid();

            ArrayList xx = control.getPostDetail(idpost);

            pbFoto.Image     = (Image)xx[0];
            tbJudul.Text     = xx[1].ToString();
            tbStok.Text      = xx[3].ToString();
            tbLokasi.Text    = xx[4].ToString();
            tbHarga.Text     = xx[5].ToString();
            tbDeskripsi.Text = xx[6].ToString();
            cbHasil.Text     = xx[7].ToString();
            cbProvinsi.Text  = xx[8].ToString();
            cbKota.Text      = xx[9].ToString();
        }