Esempio n. 1
0
        private void RecordTSB_Click(object sender, EventArgs e)
        {   /*
             * DataSet data = new moduluserCRUD().getData(txtUserID.Text, txtModul.Text);
             * dtGrid.DataSource = data;
             * dtGrid.DataMember = "tblmoduluser";
             * */
            DataSet dsDetail = new moduluserCRUD().getData(txtUserID.Text, txtModul.Text);

            dtGrid.Rows.Clear();
            for (int i = 0; i < dsDetail.Tables[0].Rows.Count; i++)
            {
                dtGrid.Rows.Add();
                dtGrid.Rows[i].HeaderCell.Value          = "V";
                dtGrid.Rows[i].Cells["hUserID"].Value    = dsDetail.Tables[0].Rows[i]["USERID"].ToString();
                dtGrid.Rows[i].Cells["hModul"].Value     = dsDetail.Tables[0].Rows[i]["MODUL"].ToString();
                dtGrid.Rows[i].Cells["hSave"].Value      = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["SAVE"]);
                dtGrid.Rows[i].Cells["hUpdate"].Value    = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["UPDAT"]);
                dtGrid.Rows[i].Cells["hDelete"].Value    = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["DEL"]);
                dtGrid.Rows[i].Cells["hPrint"].Value     = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["PRINT"]);
                dtGrid.Rows[i].Cells["hApprove"].Value   = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["APPROVE"]);
                dtGrid.Rows[i].Cells["hUnApprove"].Value = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["UNAPPROVE"]);
                dtGrid.Rows[i].Cells["hCheck"].Value     = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["CEK"]);
                dtGrid.Rows[i].Cells["hAck"].Value       = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["ACKNOWLEGMENT"]);
                dtGrid.Rows[i].Cells["hSee"].Value       = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["SEE"]);
            }
        }
Esempio n. 2
0
        private void frmjoborder_Shown(object sender, EventArgs e)
        {
            DataSet dsModulUser = new moduluserCRUD().findData(GlobalVariables.GUserID, "Job Order");

            if (dsModulUser.Tables[0].Rows.Count > 0)
            {
                if (Convert.ToInt32(dsModulUser.Tables[0].Rows[0]["SEE"]) == 0)
                {
                    MessageBox.Show("You Not Allowed this Modul");
                    this.Dispose();
                }
                else
                {
                }
            }
            else
            {
                MessageBox.Show("You Not Allowed this Modul");
                this.Dispose();
            }
        }