public void PERIODE_SelectedIndexChanged(object sender, EventArgs e)
 {
     System.Data.DataTable dt_PERIODE = conn.GetDataTable("SELECT * FROM VW_RFPERIODE where PERIODEID= '" + PERIODE.SelectedValue.ToString() + "' ", null, this.dbtimeout, true, true);
     if (dt_PERIODE.Rows.Count > 0)
     {
         s_periode = dt_PERIODE.Rows[0]["FLAG"].ToString();
         if (dt_PERIODE.Rows[0]["FLAG"].ToString().Equals("1"))
         {
             div_ListPelaporan.Style.Add("display", "");
             div_BulanPelaporan.Style.Add("display", "");
             div_tanggalPelaporan.Style.Add("display", "NONE");
             StaticFramework.Reff(this.TANGGAL_PERIODE, Q_TANGGAL, null, this.conn, false);
             StaticFramework.Reff(this.BULAN_PERIODE, Q_BULAN, null, this.conn, false);
             Bind_DataList();
         }
         else if (dt_PERIODE.Rows[0]["FLAG"].ToString().Equals("2"))
         {
             div_BulanPelaporan.Style.Add("display", "NONE");
             div_ListPelaporan.Style.Add("display", "NONE");
             div_tanggalPelaporan.Style.Add("display", "NONE");
         }
         else
         {
             div_BulanPelaporan.Style.Add("display", "NONE");
             div_ListPelaporan.Style.Add("display", "NONE");
             div_tanggalPelaporan.Style.Add("display", "");
             StaticFramework.Reff(this.DATETIMELIMIT, Q_TANGGAL, null, this.conn, false);
         }
     }
 }
        public void UNIT_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Session["GROUPID"].ToString().Equals("002PEN"))
            {
                StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + Session["UnitID"].ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "'  AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "' and PIC ='" + Session["Userid"].ToString() + "'", null, this.conn, false);
            }
            else if (Session["GROUPID"].ToString().Equals("003HEAD") && Request.QueryString["AP"].ToString().Equals(""))
            {
                StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + Session["UnitID"].ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "'  AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "' and DEPTHEAD ='" + Session["Userid"].ToString() + "'", null, this.conn, false);
            }
            //if (Session["GROUPID"].ToString().Equals("002PEN") || (Session["GROUPID"].ToString().Equals("003HEAD") && Request.QueryString["AP"].ToString().Equals("")))
            //{
            //    StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + Session["UnitID"].ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "'  AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "'", null, this.conn, false);
            //    L_UNIT = Session["UnitID"].ToString();
            //}

            else
            {
                StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + UNIT.SelectedValue.ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "' AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "'", null, this.conn, false);
                L_UNIT = UNIT.SelectedValue.ToString();
            }
            //StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_JENISREPORT WHERE UNITID ='" + UNIT.SelectedValue.ToString() + "' ", null, this.conn, false);

            //StaticFramework.Reff(this.PIC, "SELECT [USERID] , [SU_FULLNAME] FROM  [MRSDATA].[dbo].[VW_USER] WHERE UNIT ='" + UNIT.SelectedValue.ToString() + "' and [GROUPID] ='002PEN'", null, this.conn, false);

            //StaticFramework.Reff(this.DEPTHEAD, "SELECT [USERID] , [SU_FULLNAME] FROM  [MRSDATA].[dbo].[VW_USER] WHERE UNIT ='" + UNIT.SelectedValue.ToString() + "' and [GROUPID] ='003HEAD'", null, this.conn, false);
        }
        public void UNIT_SelectedIndexChanged(object sender, EventArgs e)
        {
            //            StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_JENISREPORT WHERE UNITID ='" + UNIT.SelectedValue.ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "'", null, this.conn, false);

            //StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_JENISREPORT WHERE UNITID ='" + UNIT.SelectedValue.ToString() + "' ", null, this.conn, false);

            StaticFramework.Reff(this.PIC, "SELECT [USERID] , [SU_FULLNAME] FROM  [MRSDATA].[dbo].[VW_USER] WHERE UNIT ='" + ddl_UNIT.SelectedValue.ToString() + "' and [GROUPID] ='002PEN'", null, this.conn, false);

            StaticFramework.Reff(this.DEPTHEAD, "SELECT [USERID] , [SU_FULLNAME] FROM  [MRSDATA].[dbo].[VW_USER] WHERE UNIT ='" + ddl_UNIT.SelectedValue.ToString() + "' and [GROUPID] ='003HEAD'", null, this.conn, false);
        }
 private void RetreivedataDDL()
 {
     try
     {
         StaticFramework.Reff(this.ddl_UNIT, Q_UNIT, null, this.conn, false);
     }
     catch (Exception e)
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('error : getdata')", true);
     }
 }
 public void PERIODE_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (Session["GROUPID"].ToString().Equals("002PEN"))
     {
         StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + Session["UnitID"].ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "'  AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "' and PIC ='" + Session["Userid"].ToString() + "'", null, this.conn, false);
     }
     else if (Session["GROUPID"].ToString().Equals("003HEAD") && Request.QueryString["AP"].ToString().Equals(""))
     {
         StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + Session["UnitID"].ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "'  AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "' and DEPTHEAD ='" + Session["Userid"].ToString() + "'", null, this.conn, false);
     }
     else
     {
         StaticFramework.Reff(this.JENIS, "SELECT distinct REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + UNIT.SelectedValue.ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "' AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "'", null, this.conn, false);
     }
 }
 private void RetreivedataDDL()
 {
     try
     {
         if (Session["groupid"].ToString().Equals("00") || Session["groupid"].ToString().Equals("001COM"))
         {
             StaticFramework.Reff(this.FORWARD, "select USERID, SU_FULLNAME  from VW_FORWARD where GROUPID in('003HEAD','004KADIV')  ", null, this.conn, false);
         }
         else
         {
             StaticFramework.Reff(this.FORWARD, "select USERID, SU_FULLNAME  from VW_FORWARD where UNIT = '" + Session["Unitid"].ToString() + "'and GROUPID in('003HEAD','004KADIV')  and USERID not in (select distinct DEPTHEAD from DATA_COMPLIANCE where pic = '" + Session["userid"].ToString() + "')", null, this.conn, false);
         }
         StaticFramework.Reff(this.INSTANSIID, Q_INSTANSI, null, this.conn, false);
     }
     catch (Exception e)
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('error : getdata')", true);
     }
 }
 private void RetreivedataDDL()
 {
     try
     {
         //StaticFramework.Reff(this.INSTANSIID, Q_RFINSTANSI, null, this.conn, false);
         StaticFramework.Reff(this.PERIODE, Q_PERIODE, null, this.conn, false);
         StaticFramework.Reff(this.UNIT, Q_UNIT, null, this.conn, false);
         System.Data.DataTable dt = this.conn.GetDataTable(Q_RFINSTANSI, null, this.dbtimeout, true, true);
         if (dt.Rows.Count > 0)
         {
             INSTANSIID.DataValueField = "INSTANSIID";
             INSTANSIID.DataTextField  = "INSTANSINAME";
             INSTANSIID.DataSource     = dt;
             INSTANSIID.DataBind();
         }
     }
     catch (Exception e)
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('error getdata')", true);
     }
 }
        public void INSTANSIID_SelectedIndexChanged(object sender, EventArgs e)
        {
            instansi = "";
            int index = 0;

            for (int i = 0; i < INSTANSIID.Items.Count; i++)
            {
                if (INSTANSIID.Items[i].Selected)
                {
                    if (index == 0)
                    {
                        instansi += INSTANSIID.Items[i].Value.ToString();
                    }
                    else
                    {
                        instansi += "," + INSTANSIID.Items[i].Value.ToString();
                    }
                    index += 1;
                }
            }

            StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_JENISREPORT WHERE UNITID ='" + UNIT.SelectedValue.ToString() + "' AND INSTANSIID in (SELECT SPLITDATA FROM [dbo].[fnSplitString]('" + instansi + "',','))", null, this.conn, false);
            //StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_JENISREPORT WHERE UNITID ='" + UNIT.SelectedValue.ToString() + "' ", null, this.conn, false);
        }
        public void GROUP_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (GROUP.SelectedValue.Equals("003HEAD"))
            {
                div_role.Visible     = true;
                div_penerima.Visible = false;
                div_kadiv.Visible    = false;
                StaticFramework.Reff(this.SU_UPLINER, "SELECT USERID,SU_FULLNAME FROM VW_KADIV WHERE UNIT='" + UNIT.SelectedValue.ToString() + "'", null, this.conn, false);

                lb_judul.Text = "Kepala Divisi";
            }
            else if (GROUP.SelectedValue.Equals("002PEN"))
            {
                div_penerima.Visible = true;
                div_role.Visible     = true;
                div_kadiv.Visible    = false;
                lb_judul.Text        = "Approval";

                StaticFramework.Reff(this.SU_UPLINER, "SELECT USERID,SU_FULLNAME FROM [VW_HEAD] WHERE UNIT='" + UNIT.SelectedValue.ToString() + "'", null, this.conn, false);

                StaticFramework.Reff(this.PIC2, "SELECT USERID,SU_FULLNAME FROM VW_PIC2 WHERE UNIT='" + UNIT.SelectedValue.ToString() + "' and USERID not in('" + NIK.Value.ToString() + "')", null, this.conn, false);
            }
            else if (GROUP.SelectedValue.Equals("004KADIV"))
            {
                div_penerima.Visible = false;
                div_role.Visible     = false;
                div_kadiv.Visible    = true;
            }

            else
            {
                div_kadiv.Visible    = false;
                div_role.Visible     = false;
                div_penerima.Visible = false;
            }
        }
        protected void RetrieveData()
        {
            //String AP_REGNO = EncryptAndDecrypt.Decrypt(base.Request.QueryString["IN"].ToString()).ToString();
            // String UNIT = EncryptAndDecrypt.Decrypt(base.Request.QueryString["UN"].ToString()).ToString();
            // String JENIS = EncryptAndDecrypt.Decrypt(base.Request.QueryString["JN"].ToString()).ToString();
            String UNIT  = base.Request.QueryString["UN"].ToString().ToString();
            String JENIS = base.Request.QueryString["JN"].ToString().ToString();

            object[] param = new object[]
            {
                IdGenerate
            };
            //System.Data.DataTable dataTable = this.conn.GetDataTable("SELECT INSTANSIID,JENIS, DATETIMELIMIT,KETERANGAN,Sanksi, UNIT,convert(varchar,DATECREATED,126) as DATECREATED,USERCREATED,STATUS FROM DATA_COMPLIANCE where INSTANSIID =@1 and UNIT=@2 and JENIS =@3", param, this.dbtimeout, true, true);
            System.Data.DataTable dataTable = conn.GetDataTable("SELECT UNIT,JENIS, DATETIMELIMIT,KETERANGAN,Sanksi,Sanksi_ket, convert(varchar,DATECREATED,126) as DATECREATED,DEPTHEAD,PIC,PERIODE,USERCREATED,STATUS,JENISREPORT FROM VW_DATAALERT where AP_REGNO = @1 ", param, this.dbtimeout, true, true);
            if (dataTable.Rows.Count > 0)
            {
                StaticFramework.Retrieve(dataTable, this.UNIT);
                StaticFramework.Retrieve(dataTable, this.KETERANGAN);
                StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_JENISREPORT WHERE UNITID ='" + UNIT + "'AND INSTANSIID in (SELECT SPLITDATA FROM [dbo].[fnSplitString]('" + instansi + "',','))", null, this.conn, false);
                //StaticFramework.Reff(this.PIC, "SELECT [USERID] , [SU_FULLNAME] FROM  [MRSDATA].[dbo].[VW_USER] WHERE UNIT ='" + UNIT + "' and [GROUPID] ='002PEN'", null, this.conn, false);
                StaticFramework.Reff(this.DEPTHEAD, "SELECT [USERID] , [SU_FULLNAME] FROM  [MRSDATA].[dbo].[VW_HEAD] WHERE UNIT ='" + UNIT + "'", null, this.conn, false);

                System.Data.DataTable dt = conn.GetDataTable("SELECT * FROM VW_GETINSTANSI where AP_REGNO = @1 ", param, this.dbtimeout, true, true);
                if (dt.Rows.Count > 0)
                {
                    for (int a = 0; a < dt.Rows.Count; a++)
                    {
                        for (int i = 0; i < INSTANSIID.Items.Count; i++)
                        {
                            if (dt.Rows[a]["INSTANSIID"].ToString() == INSTANSIID.Items[i].Value.ToString())
                            {
                                INSTANSIID.Items[i].Selected = true;
                            }
                        }
                    }
                }


                StaticFramework.Retrieve(dataTable, DEPTHEAD);

                StaticFramework.Reff(this.PIC, "SELECT [USERID] , [SU_FULLNAME] FROM  [MRSDATA].[dbo].[VW_USER] WHERE UNIT ='" + UNIT + "' and SU_UPLINER='" + DEPTHEAD.SelectedValue.ToString() + "'  and [GROUPID] ='002PEN'", null, this.conn, false);

                StaticFramework.Retrieve(dataTable, PIC);
                StaticFramework.Retrieve(dataTable, PERIODE);

                System.Data.DataTable dt_PERIODE = conn.GetDataTable("SELECT * FROM VW_RFPERIODE where PERIODEID= '" + PERIODE.SelectedValue.ToString() + "' ", null, this.dbtimeout, true, true);
                if (dt_PERIODE.Rows.Count > 0)
                {
                    s_periode = dt_PERIODE.Rows[0]["FLAG"].ToString();
                    if (dt_PERIODE.Rows[0]["FLAG"].ToString().Equals("1"))
                    {
                        div_ListPelaporan.Style.Add("display", "");
                        div_BulanPelaporan.Style.Add("display", "");
                        div_tanggalPelaporan.Style.Add("display", "NONE");
                        StaticFramework.Reff(this.TANGGAL_PERIODE, Q_TANGGAL, null, this.conn, false);
                        StaticFramework.Reff(this.BULAN_PERIODE, Q_BULAN, null, this.conn, false);
                        Bind_DataList();
                    }
                    else
                    if (dt_PERIODE.Rows[0]["FLAG"].ToString().Equals("2"))
                    {
                        div_BulanPelaporan.Style.Add("display", "NONE");
                        div_ListPelaporan.Style.Add("display", "NONE");
                        div_tanggalPelaporan.Style.Add("display", "NONE");
                    }
                    else
                    {
                        div_BulanPelaporan.Style.Add("display", "NONE");
                        div_ListPelaporan.Style.Add("display", "NONE");
                        div_tanggalPelaporan.Style.Add("display", "");
                        StaticFramework.Reff(this.DATETIMELIMIT, Q_TANGGAL, null, this.conn, false);
                        StaticFramework.Retrieve(dataTable, DATETIMELIMIT);
                    }
                }

                StaticFramework.Retrieve(dataTable, JENISREPORT);
                StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_JENISREPORT WHERE UNITID ='" + UNIT + "' ", null, this.conn, false);

                StaticFramework.Retrieve(dataTable, this.JENIS);
                //StaticFramework.Retrieve(dataTable, this.Sanksi);
                Sanksi.Value = String.Format(CultureInfo.InvariantCulture, "{0:0,0}", Convert.ToDecimal(dataTable.Rows[0]["Sanksi"].ToString().Replace(",00", "").Replace(",", "")));
                //Sanksi.Value = string.Format("{0:###,###}", Convert.ToDecimal(dataTable.Rows[0]["Sanksi"].ToString().Replace(",00", "")));

                //Sanksi.Value=String.Format(((Math.Round(Convert.ToDouble(dataTable.Rows[0]["Sanksi"].ToString().Replace(",00", ""))) == Convert.ToDouble(dataTable.Rows[0]["Sanksi"].ToString().Replace(",00", ""))) ? "{0:0}" : "{0:###,00}"), Convert.ToDouble(dataTable.Rows[0]["Sanksi"].ToString().Replace(",00", ""))); ;
                StaticFramework.Retrieve(dataTable, Sanksi_ket);
            }
        }
 public void DEPTHEAD_SelectedIndexChanged(object sender, EventArgs e)
 {
     StaticFramework.Reff(this.PIC, "SELECT [USERID] , [SU_FULLNAME] FROM  [MRSDATA].[dbo].[VW_USER] WHERE UNIT ='" + UNIT.SelectedValue.ToString() + "' and SU_UPLINER='" + DEPTHEAD.SelectedValue.ToString() + "'  and [GROUPID] ='002PEN'", null, this.conn, false);
 }
        protected void RetrieveData()
        {
            object[] param = new object[]
            {
                IdGenerate
            };
            var dataTable = this.conn.GetDataTable("SELECT userid,UNIT,INSTANSIID,NOSURAT, convert(varchar,TGLSURAT,126) as TGLSURAT,PERIHAL,convert(varchar,DATETIMELIMIT,126) as DATETIMELIMIT,KETERANGAN,Sanksi, UNIT,convert(varchar,TGLINPUT,126) as TGLINPUT, UPLOADFILE,JENIS,PERIODE,JENISREPORT,SANKSI_KET FROM VW_APPMRS where AP_REGINPUT =@1", param, this.dbtimeout, true, true);

            if (dataTable.Rows.Count > 0)
            {
                StaticFramework.Retrieve(dataTable, this.INSTANSIID);
                StaticFramework.Retrieve(dataTable, this.NOSURAT);
                //StaticFramework.Retrieve(dataTable, this.TGLSURAT);
                if (!dataTable.Rows[0]["TGLSURAT"].ToString().Equals(""))
                {
                    dtime          = DateTime.ParseExact(dataTable.Rows[0]["TGLSURAT"].ToString(), "yyyy-MM-d", CultureInfo.InvariantCulture);
                    TGLSURAT.Value = dtime.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);
                }
                StaticFramework.Retrieve(dataTable, this.PERIHAL);
                //StaticFramework.Retrieve(dataTable, this.DATETIMELIMIT);
                if (!dataTable.Rows[0]["DATETIMELIMIT"].ToString().Equals(""))
                {
                    dtime = DateTime.ParseExact(dataTable.Rows[0]["DATETIMELIMIT"].ToString(), "yyyy-MM-d", CultureInfo.InvariantCulture);
                    DATETIMELIMIT.Value = dtime.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);
                }

                StaticFramework.Retrieve(dataTable, this.JENISREPORT);
                StaticFramework.Retrieve(dataTable, this.SANKSI_KET);
                StaticFramework.Retrieve(dataTable, this.PERIODE);
                StaticFramework.Retrieve(dataTable, this.KETERANGAN);
                //StaticFramework.Retrieve(dataTable, this.TGLINPUT);
                if (!dataTable.Rows[0]["TGLINPUT"].ToString().Equals(""))
                {
                    dtime          = DateTime.ParseExact(dataTable.Rows[0]["TGLINPUT"].ToString(), "yyyy-MM-d", CultureInfo.InvariantCulture);
                    TGLINPUT.Value = dtime.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);
                }
                fileupload.Text = dataTable.Rows[0]["UPLOADFILE"].ToString();

                //Sanksi.Value = string.Format("{0:#,00}", Convert.ToDecimal(dataTable.Rows[0]["Sanksi"].ToString().Replace(",00", "").Replace(",", "")));
                if (!dataTable.Rows[0]["Sanksi"].ToString().Equals(""))
                {
                    Sanksi.Value = String.Format(CultureInfo.InvariantCulture, "{0:0,0}", Convert.ToDecimal(dataTable.Rows[0]["Sanksi"].ToString().Replace(",00", "").Replace(",", "")));
                }
                if (Session["GROUPID"].ToString().Equals("002PEN"))
                {
                    StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + Session["UnitID"].ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "'  AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "' and PIC ='" + Session["Userid"].ToString() + "'", null, this.conn, false);
                    s_user = dataTable.Rows[0]["userid"].ToString();
                }
                else if (Session["GROUPID"].ToString().Equals("003HEAD") && Request.QueryString["AP"].ToString().Equals(""))
                {
                    StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + Session["UnitID"].ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "'  AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "' and DEPTHEAD ='" + Session["Userid"].ToString() + "'", null, this.conn, false);
                    s_user = dataTable.Rows[0]["userid"].ToString();
                }
                else if (Session["GROUPID"].ToString().Equals("00"))
                {
                    StaticFramework.Retrieve(dataTable, this.UNIT);
                    StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + UNIT.SelectedValue.ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "' AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "'", null, this.conn, false);
                    s_user = dataTable.Rows[0]["userid"].ToString();
                }
                else
                {
                    StaticFramework.Retrieve(dataTable, this.UNIT);
                    StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_NAMALAPORAN WHERE UNITID ='" + UNIT.SelectedValue.ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "' AND PERIODE ='" + PERIODE.SelectedValue.ToString() + "'", null, this.conn, false);
                }
                StaticFramework.Retrieve(dataTable, this.JENIS);
            }
        }
        protected void RetrieveData()
        {
            object[] param = new object[]
            {
                ID,
                this.USERID
            };

            System.Data.DataTable dataTable = this.conn.GetDataTable("SELECT  * FROM [VW_USER] where USERID =@1", param, this.dbtimeout, true, true);
            if (dataTable.Rows.Count > 0)
            {
                StaticFramework.Retrieve(dataTable, "USERID", NIK);
                StaticFramework.Retrieve(dataTable, "SU_FULLNAME", FULLNAME);
                StaticFramework.Retrieve(dataTable, "UNIT", this.UNIT);
                StaticFramework.Retrieve(dataTable, "SU_HPNUM", this.NOUSER);
                StaticFramework.Retrieve(dataTable, "SU_EMAIL", this.email);
                StaticFramework.Retrieve(dataTable, "SU_EMAIL_2", this.email2);

                //StaticFramework.Retrieve(dataTable, "SU_HPNUM_DEPHEAD", this.NODEVHEAD);
                //StaticFramework.Retrieve(dataTable, "SU_EMAIL_DEPHEAD", this.emailDevHead);
                //StaticFramework.Retrieve(dataTable, "SU_HPNUM_KADIV", this.NOKADIV);
                //StaticFramework.Retrieve(dataTable, "SU_EMAIL_KADIV", this.emailDivisi);
                //StaticFramework.Retrieve(dataTable, "SU_HPNUM_DIREKTUR", this.NODIREKTUR);
                //StaticFramework.Retrieve(dataTable, "SU_EMAIL_DIREKTUR",this.emailDirektur);
                StaticFramework.Retrieve(dataTable, "GROUPID", this.GROUP);
                //email.Value = dataTable.Rows[0]["SU_EMAIL"].ToString();
                //emailDevHead.Value = dataTable.Rows[0]["SU_EMAIL_DEPHEAD"].ToString();
                //emailDivisi.Value = dataTable.Rows[0]["SU_EMAIL_KADIV"].ToString();
                //emailDirektur.Value = dataTable.Rows[0]["SU_EMAIL_DIREKTUR"].ToString();
                if (GROUP.SelectedValue.Equals("003HEAD"))
                {
                    div_role.Visible     = true;
                    div_kadiv.Visible    = false;
                    div_penerima.Visible = false;
                    // StaticFramework.Retrieve(dataTable, "SU_HPNUM_KADIV", this.NOKADIV);
                    // StaticFramework.Retrieve(dataTable, "SU_EMAIL_KADIV", this.emailDivisi);

                    StaticFramework.Reff(this.SU_UPLINER, "SELECT USERID,SU_FULLNAME FROM VW_KADIV WHERE UNIT='" + UNIT.SelectedValue.ToString() + "'", null, this.conn, false);
                    StaticFramework.Retrieve(dataTable, "SU_UPLINER", SU_UPLINER);
                    lb_judul.Text = "Kepala Divisi";
                }
                else if (GROUP.SelectedValue.Equals("002PEN"))
                {
                    div_penerima.Visible = true;
                    div_role.Visible     = true;
                    lb_judul.Text        = "Approval";
                    div_kadiv.Visible    = false;

                    StaticFramework.Reff(this.SU_UPLINER, "SELECT USERID,SU_FULLNAME FROM [VW_HEAD] WHERE UNIT='" + UNIT.SelectedValue.ToString() + "'", null, this.conn, false);
                    StaticFramework.Retrieve(dataTable, "SU_UPLINER", SU_UPLINER);

                    StaticFramework.Reff(this.PIC2, "SELECT USERID,SU_FULLNAME FROM VW_PIC2 WHERE UNIT='" + UNIT.SelectedValue.ToString() + "' and USERID not in('" + NIK.Value.ToString() + "')", null, this.conn, false);
                    StaticFramework.Retrieve(dataTable, "USER_DELEGATE", this.PIC2);
                }
                else if (GROUP.SelectedValue.Equals("004KADIV"))
                {
                    div_kadiv.Visible    = true;
                    div_role.Visible     = false;
                    div_penerima.Visible = false;
                    StaticFramework.Retrieve(dataTable, "SU_HPNUM_DIREKTUR", this.NODIREKTUR);
                    StaticFramework.Retrieve(dataTable, "SU_EMAIL_DIREKTUR", this.emailDirektur);
                }
                else
                {
                    div_role.Visible     = false;
                    div_kadiv.Visible    = false;
                    div_penerima.Visible = false;
                }

                System.Data.DataTable dataTable1 = this.conn.GetDataTable("select SU_LOGON from SCALLUSERFLAG  where USERID =@1", param, this.dbtimeout, true, true);
                if (dataTable1.Rows.Count > 0)
                {
                    StaticFramework.Retrieve(dataTable1, "SU_LOGON", this.cb_login);
                    if (cb_login.Checked)
                    {
                        cb_login.Text = "Sedang Login";
                    }
                    else
                    {
                        cb_login.Text = "Tidak Login";
                    }
                }
                div_login.Visible = true;
            }
        }
Exemple #14
0
 public void INSTANSIID_SelectedIndexChanged(object sender, EventArgs e)
 {
     StaticFramework.Reff(this.JENIS, "SELECT REPORTID , REPORTNAME FROM VW_JENISREPORT WHERE UNITID ='" + UNIT.SelectedValue.ToString() + "' AND INSTANSIID ='" + INSTANSIID.SelectedValue.ToString() + "'", null, this.conn, false);
 }