Exemple #1
0
        protected void tambah(int index)
        {
            TableRow r = new TableRow();

            r.ID = "baris_" + index;
            TableCell       c;
            DropDownList    ddl;
            RadioButtonList rbl;
            TextBox         tb;
            Label           l;

            ddl    = new DropDownList();
            ddl.ID = "lvlsales_" + index;

            if (tipe.SelectedIndex == 0)
            {
                LibMkt.ListLvlSales(ddl, 0, project.SelectedValue);
            }
            else
            {
                LibMkt.ListLvlSales(ddl, Convert.ToInt32(tipe.SelectedValue), project.SelectedValue);
            }

            c = new TableCell();
            c.Controls.Add(ddl);
            r.Cells.Add(c);

            rbl    = new RadioButtonList();
            rbl.ID = "tipetarif_" + index;
            rbl.RepeatDirection = RepeatDirection.Horizontal;
            rbl.Items.Add(new ListItem("%", "%"));
            rbl.Items.Add(new ListItem("Rp", "RP"));
            rbl.SelectedIndex = 0;

            c = new TableCell();
            c.Controls.Add(rbl);
            r.Cells.Add(c);

            tb    = new TextBox();
            tb.ID = "tarif_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(tb);
            r.Cells.Add(c);

            c          = new TableCell();
            l          = new Label();
            l.Text     = "<i class='fa fa-trash'></i>";
            l.CssClass = "btn btn-cal";
            StringBuilder x = new StringBuilder();

            x.Append("ClearSkema1('tarif_" + index + "');");
            l.Attributes["onclick"] = x.ToString();
            c.Controls.Add(l);

            r.Cells.Add(c);

            list.Controls.Add(r);
        }
        protected void tambah2(int index)
        {
            TableRow r = new TableRow();

            r.ID = "baristermin_" + index;
            TableCell       c = new TableCell();
            TextBox         tb;
            DropDownList    ddl;
            RadioButtonList rbl;

            ddl    = new DropDownList();
            ddl.ID = "lvlsaless_" + index;
            LibMkt.ListLvlSales(ddl, Convert.ToInt32(tipe.SelectedValue), project.SelectedValue);

            c = new TableCell();
            c.Controls.Add(ddl);
            r.Cells.Add(c);

            rbl    = new RadioButtonList();
            rbl.ID = "tipetarget_" + index;
            rbl.RepeatDirection = RepeatDirection.Horizontal;
            rbl.Items.Add(new ListItem("Unit", "UNIT"));
            rbl.Items.Add(new ListItem("Nilai", "NILAI"));
            rbl.SelectedIndex = 0;

            c = new TableCell();
            c.Controls.Add(rbl);
            r.Cells.Add(c);

            tb    = new TextBox();
            tb.ID = "bawah_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(tb);
            r.Cells.Add(c);

            tb    = new TextBox();
            tb.ID = "atas_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(tb);
            r.Cells.Add(c);

            tb    = new TextBox();
            tb.ID = "rewardd_" + index;

            c = new TableCell();
            c.Controls.Add(tb);
            r.Cells.Add(c);

            list2.Controls.Add(r);
        }
Exemple #3
0
        protected void tambah(int index)
        {
            TableRow r = new TableRow();

            r.ID = "baris_" + index;
            TableCell       c;
            DropDownList    ddl;
            RadioButtonList rbl;
            TextBox         tb;

            ddl    = new DropDownList();
            ddl.ID = "lvlsales_" + index;
            LibMkt.ListLvlSales(ddl, Convert.ToInt32(tipe.SelectedValue), project.SelectedValue);

            c = new TableCell();
            c.Controls.Add(ddl);
            r.Cells.Add(c);

            rbl    = new RadioButtonList();
            rbl.ID = "tipetarif_" + index;
            rbl.RepeatDirection = RepeatDirection.Horizontal;
            rbl.Items.Add(new ListItem("%", "%"));
            rbl.Items.Add(new ListItem("Rp", "RP"));
            rbl.SelectedIndex = 0;

            c = new TableCell();
            c.Controls.Add(rbl);
            r.Cells.Add(c);

            tb    = new TextBox();
            tb.ID = "tarif_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(tb);
            r.Cells.Add(c);

            rbl    = new RadioButtonList();
            rbl.ID = "potongkomisi_" + index;
            rbl.RepeatDirection = RepeatDirection.Horizontal;
            rbl.Items.Add(new ListItem("Tidak", "0"));
            rbl.Items.Add(new ListItem("Ya", "1"));
            rbl.SelectedIndex = 0;

            c = new TableCell();
            c.Controls.Add(rbl);
            r.Cells.Add(c);

            list.Controls.Add(r);
        }
        protected void tambah(int index)
        {
            TableRow r = new TableRow();

            r.ID = "baris_" + index;
            TableCell       c;
            DropDownList    ddl;
            RadioButtonList rbl;
            TextBox         tb;
            CheckBox        cb;

            ddl    = new DropDownList();
            ddl.ID = "lvlsales_" + index;
            LibMkt.ListLvlSales(ddl, Convert.ToInt32(tipe.SelectedValue), project.SelectedValue);

            c = new TableCell();
            c.Controls.Add(ddl);
            r.Cells.Add(c);

            tb          = new TextBox();
            tb.ID       = "nama_" + index;
            tb.CssClass = "form-control";
            tb.Width    = 200;

            c = new TableCell();
            c.Controls.Add(tb);
            r.Cells.Add(c);

            tb    = new TextBox();
            tb.ID = "persencair_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(tb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "lunas_" + index;

            tb    = new TextBox();
            tb.ID = "persenlunas_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(cb);
            c.Controls.Add(tb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "bf_" + index;

            tb    = new TextBox();
            tb.ID = "persenbf_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(cb);
            c.Controls.Add(tb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "dp_" + index;

            tb    = new TextBox();
            tb.ID = "persendp_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(cb);
            c.Controls.Add(tb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "ang_" + index;

            tb    = new TextBox();
            tb.ID = "persenang_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(cb);
            c.Controls.Add(tb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "ppjb_" + index;

            c = new TableCell();
            c.Controls.Add(cb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "ajb_" + index;

            c = new TableCell();
            c.Controls.Add(cb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "akad_" + index;

            c = new TableCell();
            c.Controls.Add(cb);
            r.Cells.Add(c);

            rbl    = new RadioButtonList();
            rbl.ID = "tipecair_" + index;
            rbl.RepeatDirection = RepeatDirection.Horizontal;
            rbl.Items.Add(new ListItem("Semua", "0"));
            rbl.Items.Add(new ListItem("Salah Satu", "1"));
            rbl.SelectedIndex = 0;

            c = new TableCell();
            c.Controls.Add(rbl);
            r.Cells.Add(c);

            list.Controls.Add(r);
        }
Exemple #5
0
        protected void tambah(int index)
        {
            TableRow r = new TableRow();

            r.ID = "baris_" + index;
            TableCell       c;
            RadioButtonList rbl;
            TextBox         tb;
            HtmlInputButton btn;
            Label           l;
            CheckBox        cb;
            DropDownList    ddl;

            ddl    = new DropDownList();
            ddl.ID = "lvlsales_" + index;

            if (tipe.SelectedIndex == 0)
            {
                LibMkt.ListLvlSales(ddl, 0, project.SelectedValue);
            }
            else
            {
                LibMkt.ListLvlSales(ddl, Convert.ToInt32(tipe.SelectedValue), project.SelectedValue);
            }

            c = new TableCell();
            c.Controls.Add(ddl);
            r.Cells.Add(c);

            tb          = new TextBox();
            tb.ID       = "nama_" + index;
            tb.CssClass = "form-control";
            tb.Width    = 200;

            c = new TableCell();
            c.Controls.Add(tb);
            r.Cells.Add(c);

            tb    = new TextBox();
            tb.ID = "persencair_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(tb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "lunas_" + index;

            tb    = new TextBox();
            tb.ID = "persenlunas_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(cb);
            c.Controls.Add(tb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "bf_" + index;

            tb    = new TextBox();
            tb.ID = "persenbf_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(cb);
            c.Controls.Add(tb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "dp_" + index;

            tb    = new TextBox();
            tb.ID = "persendp_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(cb);
            c.Controls.Add(tb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "ang_" + index;

            tb    = new TextBox();
            tb.ID = "persenang_" + index;
            Js.NumberFormat2(tb);

            c = new TableCell();
            c.Controls.Add(cb);
            c.Controls.Add(tb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "ppjb_" + index;

            c = new TableCell();
            c.Controls.Add(cb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "ajb_" + index;

            c = new TableCell();
            c.Controls.Add(cb);
            r.Cells.Add(c);

            cb    = new CheckBox();
            cb.ID = "akad_" + index;

            if (carabayar.SelectedIndex > 0)
            {
                if (carabayar.SelectedValue == "KPR")
                {
                    cb.Enabled = true;
                }
                else
                {
                    cb.Enabled = false;
                }
            }
            c = new TableCell();
            c.Controls.Add(cb);
            r.Cells.Add(c);

            rbl    = new RadioButtonList();
            rbl.ID = "tipecair_" + index;
            rbl.RepeatDirection = RepeatDirection.Horizontal;
            rbl.Items.Add(new ListItem("Semua", "0"));
            rbl.Items.Add(new ListItem("Salah Satu", "1"));
            rbl.SelectedIndex = 0;

            c = new TableCell();
            c.Controls.Add(rbl);
            r.Cells.Add(c);

            c          = new TableCell();
            l          = new Label();
            l.Text     = "<i class='fa fa-trash'></i>";
            l.CssClass = "btn btn-cal";
            StringBuilder x = new StringBuilder();

            x.Append("ClearTermin('nama_" + index + "','persencair_" + index + "','lunas_" + index + "','persenlunas_" + index + "','bf_" + index + "','persenbf_" + index + "','dp_" + index + "','persendp_" + index + "','ang_" + index + "','persenang_" + index + "','ppjb_" + index + "','ajb_" + index + "','akad_" + index + "');");
            l.Attributes["onclick"] = x.ToString();
            c.Controls.Add(l);
            r.Cells.Add(c);

            list.Controls.Add(r);
        }