Пример #1
0
 public void CargarVincOtros(
     System.Web.UI.WebControls.RadioButton RdbSiVinculado,
     System.Web.UI.WebControls.RadioButton RdbNoVinculado,
     DropDownList DdlVincOtros)
 {
     try
     {
         if (RdbNoVinculado.Checked == true)
         {
             DdlVincOtros.Items.Add("NINGUNO");
             DdlVincOtros.SelectedIndex = 0;
         }
         else
         {
             if (RdbSiVinculado.Checked == true)
             {
                 string consulta = "select clasificacion_exp from expediente";
                 obj1.cargar_DropDownListString(DdlVincOtros, consulta);
             }
         }
     }
     catch (Exception e)
     {
         MessageBox.Show("Se genero el siguiente error\nen tiempo de ejecución:\n" + e.Message);
     }
 }
Пример #2
0
		private void RegisterPaymentOptionControlInToggleScript(Panel panel, RadioButton radioButton)
		{
			if (panel.Visible)
			{
				PaymentTogglePayOptionsScript += "document.getElementById(\"" + panel.ClientID + "\").style.display = document.getElementById(\"" + 
					radioButton.ClientID + "\").checked?'':'none';\n";
			}
		}
Пример #3
0
		public virtual void RegisterRadioButton (RadioButton radioButton)
		{
			if (radio_button_group == null)
				radio_button_group = new ListDictionary();
			ArrayList radioButtons = (ArrayList) radio_button_group [radioButton.GroupName];
			if (radioButtons == null)
				radio_button_group [radioButton.GroupName] = radioButtons = new ArrayList();
			if (!radioButtons.Contains(radioButton))
				radioButtons.Add(radioButton);
		}
Пример #4
0
		public WebCheckListControl(CheckBox controlToRepeat) {
			if(controlToRepeat == null)
				throw new ArgumentNullException("controlToRepeat");
			//This line differs in the CheckBoxList implementation
			this.controlToRepeat						= controlToRepeat;
			this.radioButton							= this.controlToRepeat as RadioButton;
			this.controlToRepeat.ID					= "0";
			this.controlToRepeat.EnableViewState		= false;
			base.Controls.Add(this.controlToRepeat);
			this.hasChanged							= false;
		}
Пример #5
0
 private RadioButton GetSelectedRadioButton(params RadioButton[] radioButtonGroup)
 {
     RadioButton checkedRb = new RadioButton();
     for (int i = 0; i < radioButtonGroup.Length; i++)
     {
         if (radioButtonGroup[i].Checked)
         {
             checkedRb = radioButtonGroup[i];
         }
     }
     return checkedRb;
 }
Пример #6
0
        protected void order_CheckedChanged(object sender, EventArgs e)
        {
            System.Web.UI.WebControls.RadioButton myRadio = (System.Web.UI.WebControls.RadioButton)sender;
            string order = myRadio.ID;

            //MessageBox.Show(order);
            componentTable.Rows.Clear();
            List <Component> orderedList = filteredList;

            switch (order)
            {
            case "asce":
                orderedList = filteredList.OrderBy(c => Int32.Parse(c.Price)).ToList();
                break;

            case "desc":
                orderedList = filteredList.OrderByDescending(c => Int32.Parse(c.Price)).ToList();
                break;

            case "na":
                orderedList = filteredList.OrderBy(c => c.Name).ToList();
                break;

            default:
                break;
            }


            //MessageBox.Show(orderedList.Count.ToString());

            int          counter = 0;
            HtmlTableRow row     = new HtmlTableRow();

            foreach (Component myComponent in orderedList)
            {
                if (counter % 3 == 0)
                {
                    row = new HtmlTableRow();
                }

                HtmlTableCell first = new HtmlTableCell();
                string        image = "<img src = " + myComponent.Url + " alt = " + myComponent.Description + " style='width: 200px; height: 200px;'> ";
                string        name  = "<p><a runat='server' href='item.aspx?itemname=" + myComponent.Name + "'>" + myComponent.Name + "</a></p>";
                string        price = "<p>$" + myComponent.Price + "</p>";
                first.InnerHtml = image + name + price;
                row.Cells.Add(first);
                componentTable.Rows.Add(row);
                counter += 1;
            }
        }
Пример #7
0
 protected override void AttachChildControls()
 {
     this.radioAdminSelect = (RadioButton) this.FindControl("radioAdminSelect");
     this.txtTitle = (TextBox) this.FindControl("txtTitle");
     this.txtContent = (TextBox) this.FindControl("txtContent");
     this.btnRefer = ButtonManager.Create(this.FindControl("btnRefer"));
     this.btnRefer.Click += new EventHandler(this.btnRefer_Click);
     if (!this.Page.IsPostBack)
     {
         this.radioAdminSelect.Enabled = false;
         this.radioAdminSelect.Checked = true;
         this.txtTitle.Text = this.txtTitle.Text.Trim();
         this.txtContent.Text = this.txtContent.Text.Trim();
     }
 }
Пример #8
0
 protected override void AttachChildControls()
 {
     this.radioAdminSelect = (System.Web.UI.WebControls.RadioButton) this.FindControl("radioAdminSelect");
     this.txtTitle         = (System.Web.UI.WebControls.TextBox) this.FindControl("txtTitle");
     this.txtContent       = (System.Web.UI.WebControls.TextBox) this.FindControl("txtContent");
     this.btnRefer         = ButtonManager.Create(this.FindControl("btnRefer"));
     this.btnRefer.Click  += new System.EventHandler(this.btnRefer_Click);
     if (!this.Page.IsPostBack)
     {
         this.radioAdminSelect.Enabled = false;
         this.radioAdminSelect.Checked = true;
         this.txtTitle.Text            = this.txtTitle.Text.Trim();
         this.txtContent.Text          = this.txtContent.Text.Trim();
     }
 }
        protected TableCell createAdminUser(int iRowNo)
        {
            tblAthenCell     = new TableCell();
            rbAthn           = new RadioButton();
            rbAthn.ID        = "rbSuperYes" + iRowNo;
            rbAthn.Text      = "Yes";
            rbAthn.GroupName = "super" + iRowNo;
            tblAthenCell.Controls.Add(rbAthn);

            rbAthn           = new RadioButton();
            rbAthn.ID        = "rbSuperNo" + iRowNo;
            rbAthn.Text      = "No";
            rbAthn.Checked   = true;
            rbAthn.GroupName = "super" + iRowNo;
            tblAthenCell.Controls.Add(rbAthn);
            return(tblAthenCell);
        }
Пример #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Ankieta a = baza.Ankietas.Single(x => x.ID_ankiety == idAnkiety);
            Label nazwa_ankiety = new Label();
            nazwa_ankiety.Text = a.tytul;
            nazwa_ankiety.Font.Size = FontUnit.XLarge;
            this.Controls.Add(nazwa_ankiety);
            this.Controls.Add(new LiteralControl("<br />"));

            foreach (Pytanie p in a.Pytanies)
            {
                this.Controls.Add(new LiteralControl("<br />"));
                int typ = p.TypPytania.ID_typu;
                Label tresc_pytania = new Label();
                tresc_pytania.Text = p.tresc;
                tresc_pytania.Font.Size = FontUnit.XLarge;
                this.Controls.Add(tresc_pytania);
                this.Controls.Add(new LiteralControl("<br />"));

                foreach (Odpowiedz o in p.Odpowiedzs)
                {
                    switch (typ)
                    {
                        case 2:
                            CheckBox c = new CheckBox();
                            c.Text = o.tresc;
                            c.ID = Convert.ToString(o.ID_odpowiedzi);
                            this.Controls.Add(c);
                            lista_checkboxow.Add(c);
                            this.Controls.Add(new LiteralControl("<br />"));
                            break;
                        case 1:
                            RadioButton r = new RadioButton();
                            r.Text = o.tresc;
                            r.GroupName = Convert.ToString(o.pytanie);
                            r.ID = Convert.ToString(o.ID_odpowiedzi);
                            r.Checked = true;
                            this.Controls.Add(r);
                            lista_radiobuttonow.Add(r);
                            this.Controls.Add(new LiteralControl("<br />"));
                            break;
                    }
                }
            }
        }
Пример #11
0
    protected void btnGetNode_Click(object sender, EventArgs e)

    {
        string rcount = string.Empty;
        int    count  = 0;

        foreach (GridViewRow gvrow in GridView2.Rows)
        {
            var rb = gvrow.FindControl("chkRow") as System.Web.UI.WebControls.RadioButton;
            if (rb.Checked)
            {
                count++;
            }
            rcount = count.ToString();
        }
        if (rcount != "0")
        {
            try
            {
                foreach (GridViewRow row in GridView2.Rows)
                {
                    System.Web.UI.WebControls.RadioButton rbn = new System.Web.UI.WebControls.RadioButton();
                    rbn = (System.Web.UI.WebControls.RadioButton)row.FindControl("chkRow");
                    if (rbn.Checked)
                    {
                        int       RowIndex   = row.RowIndex;
                        string    varName1   = ((System.Web.UI.WebControls.Label)row.FindControl("Label2_id")).Text.ToString(); //this store the  value in varName1
                        DataTable get_supdet = new DataTable();
                        get_supdet = DBCon.Ora_Execute_table("select * from ast_supplier where ID='" + varName1 + "'");
                        if (get_supdet.Rows.Count != 0)
                        {
                            TextBox3.Text             = get_supdet.Rows[0]["sup_id"].ToString().Trim();
                            TextBox5.Text             = get_supdet.Rows[0]["sup_name"].ToString().Trim();
                            TextBox10.Text            = get_supdet.Rows[0]["sup_bank_acc_no"].ToString();
                            DD_NAMABANK.SelectedValue = get_supdet.Rows[0]["sup_bank_cd"].ToString().Trim();
                            TextBox11.Value           = get_supdet.Rows[0]["sup_address"].ToString().Trim();
                        }
                    }
                }
            }
            catch
            {
            }
        }
    }
Пример #12
0
        protected void filter_CheckedChanged(object sender, EventArgs e)
        {
            System.Web.UI.WebControls.CheckBox filter = (System.Web.UI.WebControls.CheckBox)sender;
            string order = filter.ID;

            componentTable.Rows.Clear();
            filteredList = new List <Component>();

            if (ram.Checked)
            {
                filteredList.AddRange(componentList.Where(c => c.Type == "RAM").ToList());
            }
            if (hd.Checked)
            {
                filteredList.AddRange(componentList.Where(c => c.Type == "HD").ToList());
            }
            if (cpu.Checked)
            {
                filteredList.AddRange(componentList.Where(c => c.Type == "CPU").ToList());
            }
            if (dis.Checked)
            {
                filteredList.AddRange(componentList.Where(c => c.Type == "D").ToList());
            }
            if (os.Checked)
            {
                filteredList.AddRange(componentList.Where(c => c.Type == "OS").ToList());
            }
            if (sc.Checked)
            {
                filteredList.AddRange(componentList.Where(c => c.Type == "SC").ToList());
            }
            all.Checked = false;

            List <System.Web.UI.WebControls.RadioButton> radioList = new List <System.Web.UI.WebControls.RadioButton>();

            radioList.Add(nonebox);
            radioList.Add(asce);
            radioList.Add(desc);
            radioList.Add(na);

            System.Web.UI.WebControls.RadioButton checkedButton = radioList.FirstOrDefault(r => r.Checked);
            order_CheckedChanged(checkedButton, null);
        }
Пример #13
0
    protected void btnGetNode_Click(object sender, EventArgs e)

    {
        string rcount = string.Empty;
        int    count  = 0;

        foreach (GridViewRow gvrow in GridView2.Rows)
        {
            var rb = gvrow.FindControl("chkRow") as System.Web.UI.WebControls.RadioButton;
            if (rb.Checked)
            {
                count++;
            }
            rcount = count.ToString();
        }
        if (rcount != "0")
        {
            try
            {
                foreach (GridViewRow row in GridView2.Rows)
                {
                    System.Web.UI.WebControls.RadioButton rbn = new System.Web.UI.WebControls.RadioButton();
                    rbn = (System.Web.UI.WebControls.RadioButton)row.FindControl("chkRow");
                    if (rbn.Checked)
                    {
                        int       RowIndex   = row.RowIndex;
                        string    varName1   = ((System.Web.UI.WebControls.Label)row.FindControl("Label2_id")).Text.ToString(); //this store the  value in varName1
                        DataTable get_supdet = new DataTable();
                        get_supdet       = dbcon.Ora_Execute_table("select * from ast_supplier where ID='" + varName1 + "'");
                        CommandArgument1 = get_supdet.Rows[0]["sup_id"].ToString();
                        CommandArgument2 = get_supdet.Rows[0]["sup_name"].ToString();
                        oid = CommandArgument1;
                        sdd = CommandArgument2;
                        bind4();
                    }
                }
            }
            catch
            {
            }
        }

        bind1();
    }
Пример #14
0
 protected void Group1_CheckedChanged(Object sender, EventArgs e)
 {
     foreach (GridViewRow row in gvSelected.Rows)
     {
         System.Web.UI.WebControls.RadioButton rbn = new System.Web.UI.WebControls.RadioButton();
         rbn = (System.Web.UI.WebControls.RadioButton)row.FindControl("RadioButton1");
         if (rbn.Checked)
         {
             string    ast_id       = ((System.Web.UI.WebControls.Label)row.FindControl("Label8")).Text.ToString(); //this store the  value in varName1
             DataTable ddicno_astid = new DataTable();
             ddicno_astid = dbcon.Ora_Execute_table("select lst_cmplnt_id,case when FORMAT(lst_cmplnt_dt,'dd/MM/yyyy', 'en-us') = '01/01/1900' then '' else FORMAT(lst_cmplnt_dt,'dd/MM/yyyy', 'en-us') end as lst_cmplnt_dt,case when FORMAT(lst_incident_dt,'dd/MM/yyyy', 'en-us') = '01/01/1900' then '' else FORMAT(lst_incident_dt,'dd/MM/yyyy', 'en-us') end as lst_incident_dt,lst_incident_time,lst_incident_loc,lst_police_rpt_no,case when FORMAT(lst_police_rpt_dt,'dd/MM/yyyy', 'en-us') = '01/01/1900' then '' else FORMAT(lst_police_rpt_dt,'dd/MM/yyyy', 'en-us') end as lst_police_rpt_dt,lst_remark,lst_suspect,lst_police_rpt_doc from ast_lost where lst_staff_no='" + Session["New"].ToString() + "' and lst_asset_id='" + ast_id + "'");
             if (ddicno_astid.Rows.Count != 0)
             {
                 Button4.Text   = "Kemaskini";
                 TextBox1.Text  = ddicno_astid.Rows[0]["lst_cmplnt_id"].ToString();
                 TextBox2.Text  = ddicno_astid.Rows[0]["lst_cmplnt_dt"].ToString();
                 TextBox3.Text  = ddicno_astid.Rows[0]["lst_incident_dt"].ToString();
                 TextBox5.Text  = ddicno_astid.Rows[0]["lst_incident_time"].ToString();
                 TextBox4.Text  = ddicno_astid.Rows[0]["lst_incident_loc"].ToString();
                 TextBox6.Text  = ddicno_astid.Rows[0]["lst_police_rpt_no"].ToString();
                 txt_ar1.Value  = ddicno_astid.Rows[0]["lst_remark"].ToString();
                 TextBox8.Text  = ddicno_astid.Rows[0]["lst_police_rpt_dt"].ToString();
                 TextBox7.Text  = ddicno_astid.Rows[0]["lst_suspect"].ToString();
                 TextBox13.Text = ddicno_astid.Rows[0]["lst_police_rpt_doc"].ToString();
             }
             else
             {
                 ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "$.Zebra_Dialog('Rekod Tidak Dijumpai.',{'type': 'warning','title': 'warning','auto_close': 2000});", true);
                 Button4.Text  = "Simpan";
                 TextBox1.Text = "";
                 TextBox2.Text = "";
                 TextBox3.Text = "";
                 TextBox5.Text = DateTime.Now.ToString("hh:mm:ss");
                 TextBox4.Text = "";
                 TextBox6.Text = "";
                 txt_ar1.Value = "";
                 TextBox8.Text = "";
                 TextBox7.Text = "";
             }
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            Ux_TheResponse.ID += (PageQuestion == null) ? "_" + PageElement.ElementId : "_P" + PageQuestion.PagePredefinedQuestionId;
            Ux_ErrorMessage.AssociatedControlID = Ux_TheResponse.ID;
            Ux_ElementTitel.AssociatedControlID = Ux_TheResponse.ID;

            Ux_ElementTitel.Text = PageElement.ElementText;
            if (Choices != null &&
                Choices.Count > 0)
            {                
                    foreach (PageElementChoiceDto choice in Choices)
                    {
                        Panel p = new Panel();
                        p.ID = "Uxd_Panel_" + choice.ChoiceId;
                        if (Choices.Count < 2)
                        {
                            CheckBox cb = new CheckBox();
                            cb.ID = "Uxd_CheckRadio_" + choice.ChoiceId;
                            //cb.CssClass = WebConstants.CssClassCheckRadio;
                            p.Controls.Add(cb);
                        }
                        else
                        {
                            RadioButton rb = new RadioButton();
                            rb.ID = "Uxd_CheckRadio_" + choice.ChoiceId;
                            //rb.CssClass = WebConstants.CssClassCheckRadio;
                            rb.GroupName =  "RadioGroup_" + _element.ElementId;
                            p.Controls.Add(rb);
                        }

                        Label l = new Label();
                        l.Text = choice.ElementText;
                        l.AssociatedControlID = "Uxd_CheckRadio_" + choice.ChoiceId;                        
                        l.CssClass = WebConstants.CssClassLabelNoValidationError;
                        p.Controls.Add(l);

                        p.CssClass = WebConstants.CssClassChoiceElement;
                        Ux_TheResponse.Controls.Add(p);                        
                    }               
            }
        }
Пример #16
0
        protected void all_CheckedChanged(object sender, EventArgs e)
        {
            ram.Checked = false;
            hd.Checked  = false;
            cpu.Checked = false;
            dis.Checked = false;
            os.Checked  = false;
            sc.Checked  = false;

            filteredList = componentList;

            List <System.Web.UI.WebControls.RadioButton> radioList = new List <System.Web.UI.WebControls.RadioButton>();

            radioList.Add(nonebox);
            radioList.Add(asce);
            radioList.Add(desc);
            radioList.Add(na);

            System.Web.UI.WebControls.RadioButton checkedButton = radioList.FirstOrDefault(r => r.Checked);
            order_CheckedChanged(checkedButton, null);
        }
 public virtual void RegisterRadioButton(RadioButton radioButton)
 {
     string groupName = radioButton.GroupName;
     if (!string.IsNullOrEmpty(groupName))
     {
         ArrayList list = null;
         if (this._radioButtonGroups == null)
         {
             this._radioButtonGroups = new ListDictionary();
         }
         if (this._radioButtonGroups.Contains(groupName))
         {
             list = (ArrayList) this._radioButtonGroups[groupName];
         }
         else
         {
             list = new ArrayList();
             this._radioButtonGroups[groupName] = list;
         }
         list.Add(radioButton);
     }
 }
        protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowState rowState)
        {
            base.InitializeDataCell(cell, rowState);

            // Add a radiobutton anyway, if not done already
            if (cell.Controls.Count == 0)
            {
                if (gridID != string.Empty && !DesignMode)
                {
                    Control gvw = util.ObterControle<WebControl>(((Page)HttpContext.Current.CurrentHandler).Controls, gridID);
                    if (gvw != null)
                        if (((GridView)gvw).ModelSelect == GridView.ModelSelectType.RowSelected)
                        {
                            cell.CssClass = "coluna";
                            //cell.Style["visibility"] = "hidden";
                        }
                }
                RadioButton rbn = new RadioButton();
                rbn.ID = SelectRadioButtonCustom.SelectRadioButtonCustomID;
                cell.Controls.Add(rbn);
            }
        }
Пример #19
0
    private void chkdvaluesp()
    {
        ArrayList usercontent = (ArrayList)Session["chkditems"];

        if (usercontent != null && usercontent.Count > 0)
        {
            foreach (GridViewRow gvrow in gvSelected.Rows)
            {
                Int64 index = Convert.ToInt64(gvSelected.DataKeys[gvrow.RowIndex].Value);

                if (usercontent.Contains(index))
                {
                    System.Web.UI.WebControls.RadioButton myCheckBox1 = (System.Web.UI.WebControls.RadioButton)gvrow.FindControl("chkSelect_1");

                    System.Web.UI.WebControls.RadioButton myCheckBox2 = (System.Web.UI.WebControls.RadioButton)gvrow.FindControl("chkSelect_2");

                    myCheckBox1.Checked = false;

                    myCheckBox2.Checked = true;
                }
            }
        }
    }
Пример #20
0
    protected void insert_values(object sender, EventArgs e)
    {
        string    CommandArgument1 = string.Empty, CommandArgument2 = string.Empty;
        string    c_dt = string.Empty, i_dt = string.Empty, p_dt = string.Empty;
        DataTable ddicno1 = new DataTable();

        ddicno1 = dbcon.Ora_Execute_table("select stf_staff_no From hr_staff_profile where stf_staff_no='" + Session["New"].ToString() + "' ");
        if (ddicno1.Rows.Count != 0)
        {
            DataTable ddicno = new DataTable();
            ddicno = dbcon.Ora_Execute_table("select count(*) as cnt from ast_lost");
            string cc_cnt = string.Empty;

            if (ddicno.Rows[0]["cnt"].ToString() == "0")
            {
                cc_cnt = "00001";
            }
            else
            {
                string count = (double.Parse(ddicno.Rows[0]["cnt"].ToString()) + 1).ToString();
                cc_cnt = count.PadLeft(5, '0');
            }
            if (TextBox2.Text != "")
            {
                DateTime cd = DateTime.ParseExact(TextBox2.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);
                c_dt = cd.ToString("yyyy-MM-dd");
            }
            else
            {
                c_dt = "";
            }
            if (TextBox3.Text != "")
            {
                DateTime td = DateTime.ParseExact(TextBox3.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);
                i_dt = td.ToString("yyyy-MM-dd");
            }
            else
            {
                i_dt = "";
            }

            if (TextBox8.Text != "")
            {
                DateTime pd = DateTime.ParseExact(TextBox8.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);
                p_dt = pd.ToString("yyyy-MM-dd");
            }
            else
            {
                p_dt = "";
            }

            if (get_id.Text == "0")
            {
                string rcount = string.Empty;
                int    count1 = 0;
                foreach (GridViewRow gvrow in gvSelected.Rows)
                {
                    var rb = gvrow.FindControl("RadioButton1") as System.Web.UI.WebControls.RadioButton;
                    if (rb.Checked)
                    {
                        count1++;
                    }
                    rcount = count1.ToString();
                }
                if (rcount != "0")
                {
                    int    contentLength = FileUpload1.PostedFile.ContentLength; //You may need it for validation
                    string contentType   = FileUpload1.PostedFile.ContentType;   //You may need it for validation
                    string fileName      = FileUpload1.PostedFile.FileName;

                    string fname = string.Empty;
                    if (fileName != "")
                    {
                        string[] commandArgs = fileName.ToString().Split(new char[] { '.' });
                        CommandArgument1 = commandArgs[0];
                        CommandArgument2 = commandArgs[1];
                        string Oname = CommandArgument1 + "_" + DateTime.Now.ToString("HHmmss") + "." + CommandArgument2;
                        FileUpload1.PostedFile.SaveAs(Server.MapPath("~/FILES/AST_polis/" + Oname));//Or code to save in the DataBase.
                        fname = Oname;
                    }
                    foreach (GridViewRow row in gvSelected.Rows)
                    {
                        System.Web.UI.WebControls.RadioButton rbn = new System.Web.UI.WebControls.RadioButton();
                        rbn = (System.Web.UI.WebControls.RadioButton)row.FindControl("RadioButton1");
                        if (rbn.Checked)
                        {
                            string    ast_id       = ((System.Web.UI.WebControls.Label)row.FindControl("Label8")).Text.ToString(); //this store the  value in varName1
                            DataTable ddicno_astid = new DataTable();
                            ddicno_astid = dbcon.Ora_Execute_table("select lst_cmplnt_id,lst_police_rpt_doc From ast_lost where lst_cmplnt_id='" + TextBox1.Text + "'");
                            if (ddicno_astid.Rows.Count == 0)
                            {
                                // insrt Query
                                string Inssql1 = "INSERT INTO ast_lost (lst_cmplnt_id,lst_staff_no,lst_asset_id,lst_cmplnt_dt,lst_incident_dt,lst_incident_time,lst_incident_loc,lst_police_rpt_no,lst_police_rpt_dt,lst_remark,lst_suspect,lst_verify_ind,lst_crt_id,lst_crt_dt,lst_police_rpt_doc) VALUES ('" + cc_cnt.ToString() + "','" + Session["New"].ToString() + "','" + ast_id.ToString() + "','" + c_dt.ToString() + "','" + i_dt.ToString() + "','" + TextBox5.Text + "','" + TextBox4.Text + "','" + TextBox6.Text + "','" + p_dt + "','" + txt_ar1.Value.Replace("'", "''") + "','" + TextBox7.Text + "','N','" + Session["New"].ToString() + "','" + DateTime.Now + "','" + fname + "')";
                                Status = dbcon.Ora_Execute_CommamdText(Inssql1);
                                if (Status == "SUCCESS")
                                {
                                    Session["validate_success"] = "SUCCESS";
                                    Session["alrt_msg"]         = "Rekod Berjaya Disimpan.";
                                    Response.Redirect("../Aset/Ast_pak_aset_view.aspx");
                                    //BindGrid();
                                }
                            }
                            else
                            {
                                string ssnme = string.Empty;
                                if (fname == "")
                                {
                                    ssnme = ddicno_astid.Rows[0]["lst_police_rpt_doc"].ToString();
                                }
                                else
                                {
                                    ssnme = fname;
                                }

                                string Inssql1 = "UPDATE ast_lost set lst_staff_no='" + Session["New"].ToString() + "',lst_cmplnt_dt='" + c_dt.ToString() + "',lst_incident_dt='" + i_dt.ToString() + "',lst_incident_time='" + DateTime.Now.ToString("hh:mm:ss") + "',lst_incident_loc='" + TextBox4.Text + "',lst_police_rpt_no='" + TextBox6.Text + "',lst_police_rpt_dt='" + p_dt + "',lst_remark='" + txt_ar1.Value.Replace("'", "''") + "',lst_suspect='" + TextBox7.Text + "',lst_verify_ind='N',lst_upd_id='" + Session["New"].ToString() + "',lst_upd_dt='" + DateTime.Now + "',lst_police_rpt_doc='" + ssnme + "' where lst_cmplnt_id='" + TextBox1.Text + "'";
                                Status = dbcon.Ora_Execute_CommamdText(Inssql1);
                                if (Status == "SUCCESS")
                                {
                                    Session["validate_success"] = "SUCCESS";
                                    Session["alrt_msg"]         = "Rekod Berjaya Dikemaskini.";
                                    Response.Redirect("../Aset/Ast_pak_aset_view.aspx");
                                    //BindGrid();
                                }
                            }
                        }
                    }
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "$.Zebra_Dialog('Sila Pilih Rekod Yang Ingin Dihapuskan.',{'type': 'warning','title': 'warning','auto_close': 2000});", true);
                }
            }
            else
            {
                DataTable ddicno_astid = new DataTable();
                ddicno_astid = dbcon.Ora_Execute_table("select lst_cmplnt_id,lst_police_rpt_doc From ast_lost where lst_cmplnt_id='" + lbl_name.Text + "'");
                int    contentLength = FileUpload1.PostedFile.ContentLength; //You may need it for validation
                string contentType   = FileUpload1.PostedFile.ContentType;   //You may need it for validation
                string fileName      = FileUpload1.PostedFile.FileName;

                string fname = string.Empty;
                if (fileName != "")
                {
                    string[] commandArgs = fileName.ToString().Split(new char[] { '.' });
                    CommandArgument1 = commandArgs[0];
                    CommandArgument2 = commandArgs[1];
                    string Oname = CommandArgument1 + "_" + DateTime.Now.ToString("HHmmss") + "." + CommandArgument2;
                    FileUpload1.PostedFile.SaveAs(Server.MapPath("~/FILES/AST_polis/" + Oname));//Or code to save in the DataBase.
                    fname = Oname;
                }
                string ssnme = string.Empty;
                if (fname == "")
                {
                    ssnme = ddicno_astid.Rows[0]["lst_police_rpt_doc"].ToString();
                }
                else
                {
                    ssnme = fname;
                }

                string Inssql1 = "UPDATE ast_lost set lst_staff_no='" + Session["New"].ToString() + "',lst_cmplnt_dt='" + c_dt.ToString() + "',lst_incident_dt='" + i_dt.ToString() + "',lst_incident_time='" + DateTime.Now.ToString("hh:mm:ss") + "',lst_incident_loc='" + TextBox4.Text + "',lst_police_rpt_no='" + TextBox6.Text + "',lst_police_rpt_dt='" + p_dt + "',lst_remark='" + txt_ar1.Value.Replace("'", "''") + "',lst_suspect='" + TextBox7.Text + "',lst_verify_ind='N',lst_upd_id='" + Session["New"].ToString() + "',lst_upd_dt='" + DateTime.Now + "',lst_police_rpt_doc='" + ssnme + "' where lst_cmplnt_id='" + TextBox1.Text + "'";
                Status = dbcon.Ora_Execute_CommamdText(Inssql1);
                if (Status == "SUCCESS")
                {
                    Session["validate_success"] = "SUCCESS";
                    Session["alrt_msg"]         = "Rekod Berjaya Dikemaskini.";
                    Response.Redirect("../Aset/Ast_pak_aset_view.aspx");
                    //BindGrid();
                }
            }
        }
        else
        {
            ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "$.Zebra_Dialog('Maklumat Pengguna Tidak Wujud.',{'type': 'warning','title': 'warning','auto_close': 2000});", true);
        }
    }
Пример #21
0
        /// <devdoc>
        /// <para>[To be supplied.]</para>
        /// </devdoc>
        public virtual void RegisterRadioButton(RadioButton radioButton)  {

            string groupName = radioButton.GroupName;
            if (String.IsNullOrEmpty(groupName))
                return;

            ArrayList group = null;

            if (_radioButtonGroups == null) {
                _radioButtonGroups = new ListDictionary();
            }

            if (_radioButtonGroups.Contains(groupName))  {
                group = (ArrayList)_radioButtonGroups[groupName];
            }
            else  {
                group = new ArrayList();
                _radioButtonGroups[groupName] = group;
            }

            group.Add(radioButton);
        }
Пример #22
0
        //Lista de contactos del cliente
        //List<MedDAL.DAL.clientes_contacto> lstContactosNuevos, lstContactosEliminar, lstContactosGriedView, lstContactosBD;
        #endregion

        #region Configuración de inicio
        protected void Page_Load(object sender, EventArgs e)
        {
            //Asignar titulo de modulo
            lblNombreModulo = (Label)Master.FindControl("lblNombreModulo");
            lblNombreModulo.Text = "Clientes";

            //Cargar permisos
            Hashtable htbPermisos = (Hashtable)Session["permisos"];
            char cPermiso = 'N';

            //cPermiso = (char)htbPermisos["vendedores"];

            try
            {    
                cPermiso = (char)htbPermisos["clientes"];

                //Obtener los controles de master.
            imbNuevo = (ImageButton)Master.FindControl("imgBtnNuevo");
            imbNuevo.Click += new ImageClickEventHandler(this.imbNuevo_Click);
            imbEditar = (ImageButton)Master.FindControl("imgBtnEditar");
            imbEditar.Click += new ImageClickEventHandler(this.imbEditar_Click);
            imbEliminar = (ImageButton)Master.FindControl("imgBtnEliminar");
            imbEliminar.Click += new ImageClickEventHandler(this.imbEliminar_Click);
            imbMostrar = (ImageButton)Master.FindControl("imgBtnMostrar");
            imbMostrar.Click += new ImageClickEventHandler(this.imbMostrar_Click);
            imbImprimir = (ImageButton)Master.FindControl("imgBtnImprimir");
            imbImprimir.Click += new ImageClickEventHandler(this.imbImprimir_Click);
            imbReportes = (ImageButton)Master.FindControl("imgBtnReportes");
            imbReportes.Click += new ImageClickEventHandler(this.imbReportes_Click);
            imbAceptar = (ImageButton)Master.FindControl("imgBtnAceptar");
            imbAceptar.Click += new ImageClickEventHandler(this.imbAceptar_Click);
            imbAceptar.ValidationGroup = "vgCliente";
            imbCancelar = (ImageButton)Master.FindControl("imgBtnCancelar");
            imbCancelar.Click += new ImageClickEventHandler(this.imbCancelar_Click);
            rdbTipo = (RadioButton)Master.FindControl("rdbFiltro1");
            rdbTipo.Text = "Tipo";            
            rdbClave = (RadioButton)Master.FindControl("rdbFiltro2");
            rdbClave.Text = "Clave1";
            rdbNombre = (RadioButton)Master.FindControl("rdbFiltro3");
            rdbNombre.Text = "Nombre";
            btnBuscar = (Button)Master.FindControl("btnBuscar");
            btnBuscar.Click += new EventHandler(this.btnBuscar_Click);
            txbBuscar = (TextBox)Master.FindControl("txtBuscar");


            //GT 0175
            imbReportes = (ImageButton)Master.FindControl("imgBtnReportes");
            imbReportes.Click += new ImageClickEventHandler(this.imbReportes_Click);

            //Deshabilitar botones del toolbar
            switch (cPermiso)
            {
                case 'T':
                    break;
                case 'E':
                    DesactivarEdicionEliminacion();
                    break;
                case 'L':
                    DesactivarEdicionEliminacion();
                    DesactivarNuevo();
                    break;
            }

            //Inicializacion de objetos
            oblColonias = new MedNeg.Colonias.BlColonias();
            oblPoblaciones = new MedNeg.Poblaciones.BlPoblaciones();
            oblMunicipios = new MedNeg.Municipios.BlMunicipios();
            oblEstados = new MedNeg.Estados.BlEstados();
            oblTipos = new MedNeg.Tipos.BlTipos();
            oblBitacora = new MedNeg.Bitacora.BlBitacora();
            oblCliente = new MedNeg.BlClientes.BlClientes();
            //lstContactosGriedView = new List<MedDAL.DAL.clientes_contacto>();

            gdvContactosCliente.Visible = true;
            gdvContactosCliente.ShowHeader = true;            
            gdvContactosCliente.DataSource = ((List<MedDAL.DAL.clientes_contacto>)Session["lstContactosDB"]);
            gdvContactosCliente.DataBind();
            gdvContactosCliente.DataKeyNames = new String[] { "idContacto" };

            CargarCamposEditables();
            
            if (!IsPostBack)
            {
                MostrarAreaTrabajo(false, false);
                Session["lstContactosDB"] = new List<MedDAL.DAL.clientes_contacto>();
                Session["gridviewdatasource"] = null;
                Session["ajustecontrolesreporte"] = false;
                Session["resultadoquery"] = "";
                ViewState["direccionsorting"] = System.Web.UI.WebControls.SortDirection.Ascending;

                Session["reporteactivo"] = 0;
                Session["reportdocument"] = "";
                Session["titulo"] = "";

                //GT 0175
                ConfigurarMenuBotones(true, true, false, false, false, false, true, true);
            }

            if ((bool)Session["ajustecontrolesreporte"] &&  !(bool)Session["ajustecontrolesreportecandado"])
            {
                CargarListaReportes();
                Session["ajustecontrolesreporte"] = false;
            }

            }
            catch (NullReferenceException)
            {
                //this.Page.LoadControl("~/Login.aspx");
                if (!ClientScript.IsStartupScriptRegistered("alertsession"))
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(),
                        "alertsession", "alertarSesion();", true);
                }
                MostrarAreaTrabajo(false, false);
                Site1 oPrincipal = (Site1)this.Master;
                oPrincipal.DeshabilitarControles(this);
                oPrincipal.DeshabilitarControles();                
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {

            
            Hashtable htbPermisos = (Hashtable)Session["permisos"];
            char cPermiso = 'N';

            try
            {
                #region Interfaz
                cPermiso = (char)htbPermisos["facturas"];
                imbNuevo = (ImageButton)Master.FindControl("imgBtnNuevo");
                imbNuevo.Click += new ImageClickEventHandler(this.imbNuevo_Click);
                imbEditar = (ImageButton)Master.FindControl("imgBtnEditar");
                imbEditar.Click += new ImageClickEventHandler(this.imbEditar_Click);
                imbEliminar = (ImageButton)Master.FindControl("imgBtnEliminar");
                imbEliminar.Click += new ImageClickEventHandler(this.imbEliminar_Click);
                imbMostrar = (ImageButton)Master.FindControl("imgBtnMostrar");
                imbMostrar.Click += new ImageClickEventHandler(this.imbMostrar_Click);
                imbAceptar = (ImageButton)Master.FindControl("imgBtnAceptar");
                imbAceptar.Click += new ImageClickEventHandler(this.imbAceptar_Click);
                imbCancelar = (ImageButton)Master.FindControl("imgBtnCancelar");
                imbCancelar.Click += new ImageClickEventHandler(this.imbCancelar_Click);
                imbImprimir = (ImageButton)Master.FindControl("imgBtnImprimir");
                imbImprimir.Click += new ImageClickEventHandler(this.imbImprimir_Click);
                //Master.FindControl("btnNuevo").Visible = false;
                Master.FindControl("btnEliminar").Visible = false;
                Master.FindControl("btnCancelar").Visible = false;
                Master.FindControl("btnEditar").Visible = false;
                Master.FindControl("btnAceptar").Visible = false;
                Master.FindControl("rdbFiltro1").Visible = false;
                Master.FindControl("rdbFiltro2").Visible = false;
                Master.FindControl("rdbFiltro3").Visible = false;
                Master.FindControl("btnBuscar").Visible = false;
                Master.FindControl("txtBuscar").Visible = false;
                Master.FindControl("lblBuscar").Visible = false;

                rdbTodos = (RadioButton)Master.FindControl("rdbFiltro1");
                rdbTodos.Text = "Folio";
                rdbClave = (RadioButton)Master.FindControl("rdbFiltro2");
                rdbClave.Text = "Cliente";
                rdbNombre = (RadioButton)Master.FindControl("rdbFiltro3");
                rdbNombre.Text = "Fecha";

                btnBuscar = (Button)Master.FindControl("btnBuscar");
                btnBuscar.Click += new EventHandler(this.btnBuscar_Click);
                txbBuscar = (TextBox)Master.FindControl("txtBuscar");
                Master.FindControl("btnReportes").Visible = true;

                lblNombreModulo = (Label)Master.FindControl("lblNombreModulo");
                lblNombreModulo.Text = "Facturación por recetas";

                switch (cPermiso)
                {
                    case 'T':
                        break;
                    case 'E':
                        DesactivarEdicionEliminacion();
                        break;
                    case 'L':
                        DesactivarEdicionEliminacion();
                        DesactivarNuevo();
                        break;
                }
                #endregion

                if (!IsPostBack)
                {
                    txbFechaDesde.Enabled = false;
                    txbFechaHasta.Enabled = false;
                    txbFolioDesde.Enabled = false;
                    txbFolioHasta.Enabled = false;
                    //MostrarLista();
                    //Recuperar los almacenes y llenar el combo
                    ActualizarSesionAlmacenes();
                    cmbAlmacenes.Items.Clear();
                    cmbAlmacenes.DataSource = (IQueryable<MedDAL.DAL.almacenes>)Session["lstAlmacenesFacturas"];
                    cmbAlmacenes.DataBind();
                    pnlCatalogoTotales.Visible = false;
                    pnlFormulario.Visible = false;
                    ////pnlReportes.Visible = false;
                    Session["resultadoquery"] = "";
                    ViewState["direccionsorting"] = System.Web.UI.WebControls.SortDirection.Ascending;

                    Session["reporteactivo"] = 0;
                    Session["reportdocument"] = "";
                    Session["titulo"] = "";
                }
            }
            catch (NullReferenceException)
            {
                if (!ClientScript.IsStartupScriptRegistered("alertsession"))
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(),
                        "alertsession", "alertarSesion();", true);
                }
                pnlFormulario.Visible = false;
                pnlCatalogo.Visible = false;
                pnlCatalogoTotales.Visible = false;                
                Site1 oPrincipal = (Site1)this.Master;
                oPrincipal.DeshabilitarControles(this);
                oPrincipal.DeshabilitarControles();
            }

        }
        private void refControl_edit_in_select_row_to_members(int ip_i_row_index)
        {
            m_rdb_grid_edit_theo_quoc_lo_cong_trinh = WebformFunctions.getControl_in_template<RadioButton>(
                                                                                        m_grv_unc
                                                                                        , "m_rdb_grid_edit_theo_quoc_lo_cong_trinh"
                                                                                        , ip_i_row_index
                                                                                        , eGridItem.EditItem
                                                                                        );

            m_rdb_grid_edit_theo_chuong_loai_khoan_muc = WebformFunctions.getControl_in_template<RadioButton>(
                                                                                       m_grv_unc
                                                                                       , "m_rdb_grid_edit_theo_chuong_loai_khoan_muc"
                                                                                       , ip_i_row_index
                                                                                       , eGridItem.EditItem
                                                                                       );
            m_ddl_grid_edit_du_an_quoc_lo = WebformFunctions.getControl_in_template<DropDownList>(
                                                                                       m_grv_unc
                                                                                       , "m_ddl_grid_edit_du_an_quoc_lo"
                                                                                       , ip_i_row_index
                                                                                       , eGridItem.EditItem
                                                                                       );
            m_ddl_grid_edit_loai_nhiem_vu = WebformFunctions.getControl_in_template<DropDownList>(
                                                                                       m_grv_unc
                                                                                       , "m_ddl_grid_edit_loai_nhiem_vu"
                                                                                       , ip_i_row_index
                                                                                       , eGridItem.EditItem
                                                                                       );
            m_ddl_grid_edit_du_an = WebformFunctions.getControl_in_template<DropDownList>(
                                                                                       m_grv_unc
                                                                                       , "m_ddl_grid_edit_du_an"
                                                                                       , ip_i_row_index
                                                                                       , eGridItem.EditItem
                                                                                       );
            m_ddl_grid_edit_muc_tieu_muc = WebformFunctions.getControl_in_template<DropDownList>(
                                                                                       m_grv_unc
                                                                                       , "m_ddl_grid_edit_muc_tieu_muc"
                                                                                       , ip_i_row_index
                                                                                       , eGridItem.EditItem
                                                                                       );
            m_txt_grid_edit_so_tien_nop_thue = WebformFunctions.getControl_in_template<TextBox>(
                                                                                       m_grv_unc
                                                                                       , "m_txt_grid_edit_so_tien_nop_thue"
                                                                                       , ip_i_row_index
                                                                                       , eGridItem.EditItem
                                                                                       );
            m_txt_grid_edit_so_tien_tt_cho_dv_huong = WebformFunctions.getControl_in_template<TextBox>(
                                                                                       m_grv_unc
                                                                                       , "m_txt_grid_edit_so_tien_tt_cho_dv_huong"
                                                                                       , ip_i_row_index
                                                                                       , eGridItem.EditItem
                                                                                       );
            m_txt_grid_edit_ghi_chu = WebformFunctions.getControl_in_template<TextBox>(
                                                                                       m_grv_unc
                                                                                       , "m_txt_grid_edit_ghi_chu"
                                                                                       , ip_i_row_index
                                                                                       , eGridItem.EditItem
                                                                                       );
        }
Пример #25
0
    protected void insert_values(object sender, EventArgs e)
    {
        try
        {
            if (txt_area.Value != "")
            {
                DataTable ddicno1 = new DataTable();
                ddicno1 = dbcon.Ora_Execute_table("select stf_staff_no From hr_staff_profile where stf_staff_no='" + Session["New"].ToString() + "' ");
                if (ddicno1.Rows.Count != 0)
                {
                    DataTable ddicno = new DataTable();
                    ddicno = dbcon.Ora_Execute_table("select count(*) as cnt from ast_complaint");
                    string cc_cnt = string.Empty;
                    //String.Format("{0:0000}", cc_cnt);
                    if (ddicno.Rows[0]["cnt"].ToString() == "0")
                    {
                        cc_cnt = "1";
                    }
                    else
                    {
                        cc_cnt = (double.Parse(ddicno.Rows[0]["cnt"].ToString()) + 1).ToString();
                    }

                    DateTime fd     = DateTime.ParseExact(TextBox9.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);
                    String   cmp_dt = fd.ToString("yyyy-MM-dd");

                    string rcount = string.Empty;
                    int    count1 = 0;
                    foreach (GridViewRow gvrow in GridView1.Rows)
                    {
                        var rb = gvrow.FindControl("RadioButton1") as System.Web.UI.WebControls.RadioButton;
                        if (rb.Checked)
                        {
                            count1++;
                        }
                        rcount = count1.ToString();
                    }
                    if (rcount != "0")
                    {
                        if (txt_area.Value != "")
                        {
                            foreach (GridViewRow row in GridView1.Rows)
                            {
                                System.Web.UI.WebControls.RadioButton rbn = new System.Web.UI.WebControls.RadioButton();
                                rbn = (System.Web.UI.WebControls.RadioButton)row.FindControl("RadioButton1");
                                if (rbn.Checked)
                                {
                                    string ast_id = ((System.Web.UI.WebControls.Label)row.FindControl("Label8")).Text.ToString(); //this store the  value in varName1
                                    string catid  = ((System.Web.UI.WebControls.Label)row.FindControl("Label9")).Text.ToString(); //this store the  value in varName1
                                    string scatid = ((System.Web.UI.WebControls.Label)row.FindControl("Label1")).Text.ToString(); //this store the  value in varName1
                                    string jaid   = ((System.Web.UI.WebControls.Label)row.FindControl("Label4")).Text.ToString(); //this store the  value in varName1
                                    string naid   = ((System.Web.UI.WebControls.Label)row.FindControl("Label5")).Text.ToString(); //this store the  value in varName1
                                    dbcon.Execute_CommamdText("INSERT INTO ast_complaint (cmp_id,cmp_staff_no,cmp_asset_id,cmp_complaint_dt,cmp_cat_cd,cmp_sub_cat_cd,cmp_type_cd,cmp_asset_name,cmp_remark,cmp_sts_cd,cmp_eft_dt,cmp_crt_id,cmp_crt_dt) VALUES ('" + cc_cnt + "','" + Session["New"].ToString() + "','" + ast_id + "','" + cmp_dt + "','" + catid + "','" + scatid + "','" + jaid + "','" + naid + "','" + txt_area.Value + "','01','1900-01-01','" + Session["New"].ToString() + "','" + DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss") + "')");
                                }
                            }
                            txt_area.Value = "";
                            BindGrid1();
                            pg_load();
                            ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "$.Zebra_Dialog('Rekod Berjaya Disimpan.',{'type': 'confirmation','title': 'Success','auto_close': 2000});", true);
                        }
                        else
                        {
                            BindGrid();
                            //BindGrid1();
                            ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "$.Zebra_Dialog('Sila Masukan Aduan.',{'type': 'warning','title': 'warning','auto_close': 2000});", true);
                        }
                    }
                    else
                    {
                        BindGrid();
                        BindGrid1();
                        ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "$.Zebra_Dialog('Sila Pilih Rekod Yang Ingin Dihapuskan.',{'type': 'warning','title': 'warning','auto_close': 2000});", true);
                    }
                }
                else
                {
                    BindGrid();
                    BindGrid1();
                    ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "$.Zebra_Dialog('Maklumat Pengguna Tidak Wujud.',{'type': 'warning','title': 'warning','auto_close': 2000});", true);
                }
            }
            else
            {
                BindGrid();
                ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "$.Zebra_Dialog('Sila Masukan Input Carian.',{'type': 'warning','title': 'warning','auto_close': 2000});", true);
            }
        }
        catch
        {
            BindGrid();
            BindGrid1();
            ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "$.Zebra_Dialog('Please veryfiy the input values!.',{'type': 'warning','title': 'warning','auto_close': 2000});", true);
        }
    }
 private void RunDesignTimeTests()
 {
     try
     {
         this.DataGrid1.DataSource = WebControl_Attributes.m_dataSource;
         this.DataGrid2.DataSource = WebControl_Attributes.m_dataSource;
         this.DataList1.DataSource = WebControl_Attributes.m_dataSource;
         this.DataList2.DataSource = WebControl_Attributes.m_dataSource;
         this.DataGrid1.DataBind();
         this.DataGrid2.DataBind();
         this.DataList1.DataBind();
         this.DataList2.DataBind();
         GHTSubTest test1    = this.GHTSubTest25;
         WebControl control1 = this.Button1;
         this.AddAttributes(ref test1, ref control1);
         this.Button1      = (Button)control1;
         this.GHTSubTest25 = test1;
         test1             = this.GHTSubTest26;
         control1          = this.CheckBox1;
         this.AddAttributes(ref test1, ref control1);
         this.CheckBox1    = (CheckBox)control1;
         this.GHTSubTest26 = test1;
         test1             = this.GHTSubTest28;
         control1          = this.HyperLink1;
         this.AddAttributes(ref test1, ref control1);
         this.HyperLink1   = (HyperLink)control1;
         this.GHTSubTest28 = test1;
         test1             = this.GHTSubTest30;
         control1          = this.Image1;
         this.AddAttributes(ref test1, ref control1);
         this.Image1       = (Image)control1;
         this.GHTSubTest30 = test1;
         test1             = this.GHTSubTest32;
         control1          = this.ImageButton1;
         this.AddAttributes(ref test1, ref control1);
         this.ImageButton1 = (ImageButton)control1;
         this.GHTSubTest32 = test1;
         test1             = this.GHTSubTest34;
         control1          = this.Label1;
         this.AddAttributes(ref test1, ref control1);
         this.Label1       = (Label)control1;
         this.GHTSubTest34 = test1;
         test1             = this.GHTSubTest36;
         control1          = this.LinkButton1;
         this.AddAttributes(ref test1, ref control1);
         this.LinkButton1  = (LinkButton)control1;
         this.GHTSubTest36 = test1;
         test1             = this.GHTSubTest37;
         control1          = this.Panel1;
         this.AddAttributes(ref test1, ref control1);
         this.Panel1       = (Panel)control1;
         this.GHTSubTest37 = test1;
         test1             = this.GHTSubTest38;
         control1          = this.RadioButton1;
         this.AddAttributes(ref test1, ref control1);
         this.RadioButton1 = (RadioButton)control1;
         this.GHTSubTest38 = test1;
         test1             = this.GHTSubTest39;
         control1          = this.TextBox1;
         this.AddAttributes(ref test1, ref control1);
         this.TextBox1     = (TextBox)control1;
         this.GHTSubTest39 = test1;
         test1             = this.GHTSubTest40;
         control1          = this.DropDownList1;
         this.AddAttributes(ref test1, ref control1);
         this.DropDownList1 = (DropDownList)control1;
         this.GHTSubTest40  = test1;
         test1    = this.GHTSubTest41;
         control1 = this.ListBox1;
         this.AddAttributes(ref test1, ref control1);
         this.ListBox1     = (ListBox)control1;
         this.GHTSubTest41 = test1;
         test1             = this.GHTSubTest42;
         control1          = this.RadioButtonList1;
         this.AddAttributes(ref test1, ref control1);
         this.RadioButtonList1 = (RadioButtonList)control1;
         this.GHTSubTest42     = test1;
         test1    = this.GHTSubTest43;
         control1 = this.CheckBoxList1;
         this.AddAttributes(ref test1, ref control1);
         this.CheckBoxList1 = (CheckBoxList)control1;
         this.GHTSubTest43  = test1;
         test1    = this.GHTSubTest50;
         control1 = this.DataGrid1;
         this.AddAttributes(ref test1, ref control1);
         this.DataGrid1    = (DataGrid)control1;
         this.GHTSubTest50 = test1;
         test1             = this.GHTSubTest51;
         control1          = this.DataGrid2.Items[0];
         this.AddAttributes(ref test1, ref control1);
         this.GHTSubTest51 = test1;
         test1             = this.GHTSubTest52;
         control1          = this.DataList1;
         this.AddAttributes(ref test1, ref control1);
         this.DataList1    = (DataList)control1;
         this.GHTSubTest52 = test1;
         test1             = this.GHTSubTest53;
         control1          = this.DataList2.Items[0];
         this.AddAttributes(ref test1, ref control1);
         this.GHTSubTest53 = test1;
         test1             = this.GHTSubTest54;
         control1          = this.Table1;
         this.AddAttributes(ref test1, ref control1);
         this.Table1       = (Table)control1;
         this.GHTSubTest54 = test1;
         test1             = this.GHTSubTest55;
         control1          = this.Table5;
         this.AddAttributes(ref test1, ref control1);
         this.Table5       = (Table)control1;
         this.GHTSubTest55 = test1;
         test1             = this.GHTSubTest56;
         control1          = this.Table2;
         this.AddAttributes(ref test1, ref control1);
         this.Table2       = (Table)control1;
         this.GHTSubTest56 = test1;
         test1             = this.GHTSubTest57;
         control1          = this.Table3;
         this.AddAttributes(ref test1, ref control1);
         this.Table3       = (Table)control1;
         this.GHTSubTest57 = test1;
     }
     catch (Exception exception2)
     {
         // ProjectData.SetProjectError(exception2);
         Exception exception1 = exception2;
         this.GHTSubTestBegin();
         string text1 = string.Empty + exception1.GetType().ToString();
         text1 = text1 + " caught during preperations for design time tests.";
         text1 = text1 + "<br>Message: ";
         text1 = text1 + exception1.Message;
         text1 = text1 + "<br>Trace: ";
         text1 = text1 + exception1.StackTrace;
         this.GHTSubTestAddResult(text1);
         this.GHTSubTestEnd();
         // ProjectData.ClearProjectError();
     }
 }
Пример #27
0
    protected void SaveCase_Click(object sender, EventArgs e)
    {
        string ssUserID = Session["ID"] + "";

        string sSWC002   = TXTSWC002.Text;
        string sONA01001 = LBONA001.Text;
        string sONA01002 = TXTONA002.Text;
        string sONA01003 = TXTONA003.Text;
        string sONA01004 = TXTONA004.Text;
        string sONA01005 = TXTONA005.Text;
        string sONA01006 = TXTONA006.Text;
        string sONA01007 = TXTONA007.Text;
        string sONA01025 = TXTONA025.Text;

        //點選處理
        string sONA01008 = "", sONA01009 = "", sONA01010 = "", sONA01011 = "", sONA01012 = "", sONA01013 = "", sONA01014 = "", sONA01015 = "", sONA01016 = "", sONA01017 = "", sONA01018 = "", sONA01019 = "", sONA01020 = "", sONA01021 = "", sONA0123 = "";

        string[] arrayRadioField = new string[] { "ONA01008", "ONA01009", "ONA01010", "ONA01011", "ONA01012", "ONA01013", "ONA01014", "ONA01015", "ONA01016", "ONA01017", "ONA01018", "ONA01019", "ONA01020", "ONA01021", "ONA01023" };
        string[] arrayRadioValue = new string[] { sONA01008, sONA01009, sONA01010, sONA01011, sONA01012, sONA01013, sONA01014, sONA01015, sONA01016, sONA01017, sONA01018, sONA01019, sONA01020, sONA01021, sONA0123 };
        System.Web.UI.WebControls.RadioButton[] arrayRadioA = new System.Web.UI.WebControls.RadioButton[] { RaONA008a, RaONA009a, RaONA010a, RaONA011a, RaONA012a, RaONA013a, RaONA014a, RaONA015a, RaONA016a, RaONA017a, RaONA018a, RaONA019a, RaONA020a, RaONA021a, RaONA023a };
        System.Web.UI.WebControls.RadioButton[] arrayRadioB = new System.Web.UI.WebControls.RadioButton[] { RaONA008b, RaONA009b, RaONA010b, RaONA011b, RaONA012b, RaONA013b, RaONA014b, RaONA015b, RaONA016b, RaONA017b, RaONA018b, RaONA019b, RaONA020b, RaONA021b, RaONA023b };

        for (int i = 0; i < arrayRadioValue.Length; i++)
        {
            string tRadioValue = "";
            string tRadioA     = (arrayRadioA[i].Checked.CompareTo(true) + 1).ToString();
            string tRadioB     = (arrayRadioB[i].Checked.CompareTo(true) + 1).ToString();
            if (tRadioA == "1")
            {
                tRadioValue = "1";
            }
            if (tRadioB == "1")
            {
                tRadioValue = "0";
            }

            //sONA01017,i=9
            if (i == 9)
            {
                string tRadioC = (RaONA017c.Checked.CompareTo(true) + 1).ToString();
                if (tRadioC == "1")
                {
                    tRadioValue = "2";
                }
            }

            arrayRadioValue[i] = tRadioValue;
        }


        string sEXESQLUPD = "";

        ConnectionStringSettings connectionString = ConfigurationManager.ConnectionStrings["SWCConnStr"];

        using (SqlConnection SwcConn = new SqlConnection(connectionString.ConnectionString))
        {
            SwcConn.Open();

            string strSQLRV = " select * from OnlineApply01 ";
            strSQLRV = strSQLRV + " where ONA01001 = '" + sONA01001 + "' ";

            SqlDataReader readeSwc;
            SqlCommand    objCmdSwc = new SqlCommand(strSQLRV, SwcConn);
            readeSwc = objCmdSwc.ExecuteReader();

            if (!readeSwc.HasRows)
            {
                sEXESQLUPD = " INSERT INTO OnlineApply01 (ONA01001) VALUES ('" + sONA01001 + "');";
            }
            readeSwc.Close();
            objCmdSwc.Dispose();

            sEXESQLUPD = sEXESQLUPD + " Update OnlineApply01 Set ";
            sEXESQLUPD = sEXESQLUPD + " SWC002 = '" + sSWC002 + "', ";
            sEXESQLUPD = sEXESQLUPD + " ONA01002 = '" + sONA01002 + "', ";
            sEXESQLUPD = sEXESQLUPD + " ONA01003 = '" + sONA01003 + "', ";
            sEXESQLUPD = sEXESQLUPD + " ONA01004 = '" + sONA01004 + "', ";
            sEXESQLUPD = sEXESQLUPD + " ONA01005 = '" + sONA01005 + "', ";
            sEXESQLUPD = sEXESQLUPD + " ONA01006 = '" + sONA01006 + "', ";
            sEXESQLUPD = sEXESQLUPD + " ONA01007 = '" + sONA01007 + "', ";
            for (int i = 0; i < arrayRadioValue.Length; i++)
            {
                string aField = arrayRadioField[i];
                string aValue = arrayRadioValue[i];
                sEXESQLUPD = sEXESQLUPD + aField + " = '" + aValue + "', ";
            }
            sEXESQLUPD = sEXESQLUPD + " ONA01025 = '" + sONA01025 + "', ";
            if (ssUserID == "")
            {
                sEXESQLUPD = sEXESQLUPD + " DATALOCK = 'Y', ";
            }
            sEXESQLUPD = sEXESQLUPD + " saveuser = '******', ";
            sEXESQLUPD = sEXESQLUPD + " savedate = getdate() ";

            sEXESQLUPD = sEXESQLUPD + " Where ONA01001 = '" + sONA01001 + "'";

            SqlCommand objCmdUpd = new SqlCommand(sEXESQLUPD, SwcConn);
            objCmdUpd.ExecuteNonQuery();
            objCmdUpd.Dispose();

            string sSWC000 = LBSWC000.Text + "";

            if (ssUserID == "")
            {
                SendMailNotice(sSWC000);
                Response.Write("<script>alert('資料已存檔');location.href='OnlineApply001v.aspx?SWCNO=" + sSWC000 + "&OACode=" + sONA01001 + "&UA=over';</script>");
            }
            else
            {
                string thisPageAct = ((Button)sender).ID + "";

                switch (thisPageAct)
                {
                case "SaveCase":
                    Response.Write("<script>alert('資料已存檔');location.href='SWC003.aspx?SWCNO=" + sSWC000 + "';</script>");
                    break;
                }
            }
        }
    }
 private void RunDesignTimeTests()
 {
     try
     {
         this.Datagrid3.DataSource = WebControl_Style.m_dataSource;
         this.Datagrid4.DataSource = WebControl_Style.m_dataSource;
         this.Datalist3.DataSource = WebControl_Style.m_dataSource;
         this.Datalist4.DataSource = WebControl_Style.m_dataSource;
         this.Datagrid3.DataBind();
         this.Datagrid4.DataBind();
         this.Datalist3.DataBind();
         this.Datalist4.DataBind();
         GHTSubTest test1    = this.GHTSubTest24;
         WebControl control1 = this.Button2;
         this.AddAttributes(ref test1, ref control1);
         this.Button2      = (Button)control1;
         this.GHTSubTest24 = test1;
         test1             = this.GHTSubTest25;
         control1          = this.Checkbox2;
         this.AddAttributes(ref test1, ref control1);
         this.Checkbox2    = (CheckBox)control1;
         this.GHTSubTest25 = test1;
         test1             = this.GHTSubTest26;
         control1          = this.Hyperlink2;
         this.AddAttributes(ref test1, ref control1);
         this.Hyperlink2   = (HyperLink)control1;
         this.GHTSubTest26 = test1;
         test1             = this.GHTSubTest27;
         control1          = this.Image2;
         this.AddAttributes(ref test1, ref control1);
         this.Image2       = (Image)control1;
         this.GHTSubTest27 = test1;
         test1             = this.GHTSubTest28;
         control1          = this.Imagebutton2;
         this.AddAttributes(ref test1, ref control1);
         this.Imagebutton2 = (ImageButton)control1;
         this.GHTSubTest28 = test1;
         test1             = this.GHTSubTest29;
         control1          = this.Label2;
         this.AddAttributes(ref test1, ref control1);
         this.Label2       = (Label)control1;
         this.GHTSubTest29 = test1;
         test1             = this.GHTSubTest30;
         control1          = this.Linkbutton2;
         this.AddAttributes(ref test1, ref control1);
         this.Linkbutton2  = (LinkButton)control1;
         this.GHTSubTest30 = test1;
         test1             = this.GHTSubTest31;
         control1          = this.Panel2;
         this.AddAttributes(ref test1, ref control1);
         this.Panel2       = (Panel)control1;
         this.GHTSubTest31 = test1;
         test1             = this.GHTSubTest32;
         control1          = this.Radiobutton2;
         this.AddAttributes(ref test1, ref control1);
         this.Radiobutton2 = (RadioButton)control1;
         this.GHTSubTest32 = test1;
         test1             = this.GHTSubTest33;
         control1          = this.Textbox2;
         this.AddAttributes(ref test1, ref control1);
         this.Textbox2     = (TextBox)control1;
         this.GHTSubTest33 = test1;
         test1             = this.GHTSubTest34;
         control1          = this.Dropdownlist2;
         this.AddAttributes(ref test1, ref control1);
         this.Dropdownlist2 = (DropDownList)control1;
         this.GHTSubTest34  = test1;
         test1    = this.GHTSubTest35;
         control1 = this.Listbox2;
         this.AddAttributes(ref test1, ref control1);
         this.Listbox2     = (ListBox)control1;
         this.GHTSubTest35 = test1;
         test1             = this.GHTSubTest36;
         control1          = this.Radiobuttonlist2;
         this.AddAttributes(ref test1, ref control1);
         this.Radiobuttonlist2 = (RadioButtonList)control1;
         this.GHTSubTest36     = test1;
         test1    = this.GHTSubTest37;
         control1 = this.Checkboxlist2;
         this.AddAttributes(ref test1, ref control1);
         this.Checkboxlist2 = (CheckBoxList)control1;
         this.GHTSubTest37  = test1;
         test1    = this.GHTSubTest44;
         control1 = this.Datagrid3;
         this.AddAttributes(ref test1, ref control1);
         this.Datagrid3    = (DataGrid)control1;
         this.GHTSubTest44 = test1;
         test1             = this.GHTSubTest45;
         control1          = this.Datagrid4.Items[0];
         this.AddAttributes(ref test1, ref control1);
         this.GHTSubTest45 = test1;
         test1             = this.GHTSubTest46;
         control1          = this.Datalist3;
         this.AddAttributes(ref test1, ref control1);
         this.Datalist3    = (DataList)control1;
         this.GHTSubTest46 = test1;
         test1             = this.GHTSubTest47;
         control1          = this.Datalist4.Items[0];
         this.AddAttributes(ref test1, ref control1);
         this.GHTSubTest47 = test1;
         test1             = this.GHTSubTest48;
         control1          = this.Table4;
         this.AddAttributes(ref test1, ref control1);
         this.Table4       = (Table)control1;
         this.GHTSubTest48 = test1;
         test1             = this.GHTSubTest49;
         control1          = this.Table6;
         this.AddAttributes(ref test1, ref control1);
         this.Table6       = (Table)control1;
         this.GHTSubTest49 = test1;
         test1             = this.GHTSubTest50;
         control1          = this.Table7;
         this.AddAttributes(ref test1, ref control1);
         this.Table7       = (Table)control1;
         this.GHTSubTest50 = test1;
         test1             = this.GHTSubTest51;
         control1          = this.Table8;
         this.AddAttributes(ref test1, ref control1);
         this.Table8       = (Table)control1;
         this.GHTSubTest51 = test1;
     }
     catch (Exception exception2)
     {
         // ProjectData.SetProjectError(exception2);
         Exception exception1 = exception2;
         this.GHTSubTestBegin();
         this.GHTSubTestUnexpectedExceptionCaught(exception1);
         this.GHTSubTestEnd();
         // ProjectData.ClearProjectError();
     }
 }
 protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
 {
     System.Web.UI.WebControls.RadioButton myradio =
         (System.Web.UI.WebControls.RadioButton)sender;
     Response.Write(myradio.Text);
 }
Пример #30
0
    private void RecorrerControles1(ControlCollection MyControlCollection)
    {
        foreach (System.Web.UI.Control MyWebServerControl in MyControlCollection)
        {
            string typeOfControl = MyWebServerControl.GetType().Name.ToString();

            if (!MyWebServerControl.HasControls() || MyWebServerControl.GetType().Name.ToString() == "CheckBoxList")
            {
                string controlName = MyWebServerControl.GetType().Name.ToString();
                switch (controlName)
                {
                case "TextBox":
                    System.Web.UI.WebControls.TextBox MyWebControlTextBox =
                        (System.Web.UI.WebControls.TextBox)MyWebServerControl;
                    if ((MyWebControlTextBox.Text != ""))
                    {
                        _ControlValues_String.Append((MyWebControlTextBox.ID.ToString() + ("="
                                                                                           + (MyWebControlTextBox.Text + "¦"))));
                    }
                    break;

                case "CheckBox":
                    System.Web.UI.WebControls.CheckBox MyWebControlCheckbox =
                        (System.Web.UI.WebControls.CheckBox)MyWebServerControl;
                    if (MyWebControlCheckbox.Checked)
                    {
                        _ControlValues_String.Append((MyWebControlCheckbox.ID.ToString() + ("=" + (1 + "¦"))));
                    }
                    else
                    {
                        _ControlValues_String.Append((MyWebControlCheckbox.ID.ToString() + ("=" + (0 + "¦"))));
                    }
                    break;

                case "RadioButton":
                    System.Web.UI.WebControls.RadioButton MyWebControlRadioButton =
                        (System.Web.UI.WebControls.RadioButton)MyWebServerControl;
                    if (MyWebControlRadioButton.Checked)
                    {
                        _ControlValues_String.Append((MyWebControlRadioButton.ID.ToString() + ("=" + (1 + "¦"))));
                    }
                    else
                    {
                        _ControlValues_String.Append((MyWebControlRadioButton.ID.ToString() + ("=" + (0 + "¦"))));
                    }
                    break;

                case "ListBox":
                    System.Web.UI.WebControls.ListBox MyWebControlListBox =
                        (System.Web.UI.WebControls.ListBox)MyWebServerControl;
                    if ((MyWebControlListBox.SelectedIndex > -1))
                    {
                        bool bFirstItem = true;
                        foreach (int Index in MyWebControlListBox.GetSelectedIndices())
                        {
                            if (bFirstItem)
                            {
                                _ControlValues_String.Append((MyWebControlListBox.ID.ToString() + ("=" + MyWebControlListBox.Items[Index].Text)));
                                bFirstItem = false;
                            }
                            else
                            {
                                _ControlValues_String.Append((";" + MyWebControlListBox.Items[Index].Text));
                                bFirstItem = false;
                            }
                        }
                        if (!bFirstItem)
                        {
                            _ControlValues_String.Append("¦");
                        }
                    }
                    break;

                case "CheckBoxList":
                    System.Web.UI.WebControls.CheckBoxList MyWebControlCheckBoxList =
                        (System.Web.UI.WebControls.CheckBoxList)MyWebServerControl;
                    if ((MyWebControlCheckBoxList.SelectedIndex > -1))
                    {
                        bool bFirstItem = true;

                        for (int i = 0; i < MyWebControlCheckBoxList.Items.Count; i++)
                        {
                            if (MyWebControlCheckBoxList.Items[i].Selected)
                            {
                                if (bFirstItem)
                                {
                                    _ControlValues_String.Append((MyWebControlCheckBoxList.ID.ToString() + ("=" + MyWebControlCheckBoxList.Items[i].Text)));
                                    bFirstItem = false;
                                }
                                else
                                {
                                    _ControlValues_String.Append((";" + MyWebControlCheckBoxList.Items[i].Text));
                                    bFirstItem = false;
                                }
                            }
                        }
                        if (!bFirstItem)
                        {
                            _ControlValues_String.Append("¦");
                        }
                    }
                    break;

                case "DropDownList":
                    System.Web.UI.WebControls.DropDownList MyWebControlDropDownList =
                        (System.Web.UI.WebControls.DropDownList)MyWebServerControl;
                    //  nuestra convenci�n es que un DropDownList cuyo valor
                    //  seleccionado es -1, 'no est� seleccionado'. La raz�n de
                    //  esto es que en Asp.Net un DropDownList SIEMPRE est�
                    //  seleccionado (!).
                    if (((MyWebControlDropDownList.SelectedIndex > -1) &&
                         (((string)(MyWebControlDropDownList.SelectedItem.Value)) != "-1")))
                    {
                        _ControlValues_String.Append((MyWebControlDropDownList.ID.ToString() + ("="
                                                                                                + (MyWebControlDropDownList.SelectedValue + "¦"))));
                    }
                    break;
                }
            }
            else
            {
                //  en el control collection vienen Panels y web controls que
                //  a su vez, contienen controls.
                RecorrerControles0(MyWebServerControl.Controls);
            }
        }
    }
Пример #31
0
    public void ReadStateFromFile(Page AspNetPage, ControlCollection MyControlCollection)
    {
        //  intentamos leer el archivo que corresponde a la p�gina y usuario para rescatar el state
        if (((_UserName == "") || (_PageName == "")))
        {
            return;
        }
        string fileName = string.Concat(_PageName, "-", _UserName);
        string filePath = HttpContext.Current.Server.MapPath(("~/keepstatefiles/" + fileName));
        string contents = "";

        try
        {
            contents = File.ReadAllText(filePath);
        }
        catch (Exception ex)
        {
        }
        if ((contents == ""))
        {
            return;
        }
        string[] splitout = contents.Split('¦');
        foreach (string Split in splitout)
        {
            int nPosSignoIgual = Split.IndexOf("=");
            if ((nPosSignoIgual > 0))
            {
                string sNombreControl = Split.Substring(0, nPosSignoIgual);
                string sContenido     = Split.Substring((Split.Length + 1 - (Split.Length - nPosSignoIgual)));
                System.Web.UI.Control MyWebServerControl = FindControlRecursive(AspNetPage, sNombreControl);
                if ((MyWebServerControl == null))
                {
                    // TODO: Continue For... Warning!!! not translated
                    continue;
                }
                switch (MyWebServerControl.GetType().Name.ToString())
                {
                case "TextBox":
                    System.Web.UI.WebControls.TextBox MyWebControlTextBox =
                        (System.Web.UI.WebControls.TextBox)MyWebServerControl;
                    //  este caso es f�cil pues el text box solo contiene un valor (ListBox puede tener
                    //  mucho items seleccionados)
                    MyWebControlTextBox.Text = sContenido;
                    break;

                case "CheckBox":
                    System.Web.UI.WebControls.CheckBox MyWebControlCheckbox =
                        (System.Web.UI.WebControls.CheckBox)MyWebServerControl;
                    if ((sContenido == "1"))
                    {
                        MyWebControlCheckbox.Checked = true;
                    }
                    else
                    {
                        MyWebControlCheckbox.Checked = false;
                    }
                    break;

                case "RadioButton":
                    System.Web.UI.WebControls.RadioButton MyWebControlRadioButton =
                        (System.Web.UI.WebControls.RadioButton)MyWebServerControl;
                    if ((sContenido == "1"))
                    {
                        MyWebControlRadioButton.Checked = true;
                    }
                    else
                    {
                        MyWebControlRadioButton.Checked = false;
                    }
                    break;

                case "ListBox":
                {
                    System.Web.UI.WebControls.ListBox MyWebControlListBox =
                        (System.Web.UI.WebControls.ListBox)MyWebServerControl;
                    string[] sArrayOfStrings = sContenido.Split(';');
                    foreach (string MyString in sArrayOfStrings)
                    {
                        foreach (ListItem MyListItem in MyWebControlListBox.Items)
                        {
                            if ((MyListItem.Text == MyString))
                            {
                                MyListItem.Selected = true;
                            }
                        }
                    }
                    break;
                }

                case "CheckBoxList":
                {
                    System.Web.UI.WebControls.CheckBoxList MyWebControlCheckBoxList = (System.Web.UI.WebControls.CheckBoxList)MyWebServerControl;
                    string[] sArrayOfStrings = sContenido.Split(';');
                    foreach (string MyString in sArrayOfStrings)
                    {
                        foreach (ListItem MyListItem in MyWebControlCheckBoxList.Items)
                        {
                            if ((MyListItem.Text == MyString))
                            {
                                MyListItem.Selected = true;
                            }
                        }
                    }
                    break;
                }

                case "DropDownList":
                    System.Web.UI.WebControls.DropDownList MyWebControlDropDownList =
                        (System.Web.UI.WebControls.DropDownList)MyWebServerControl;
                    MyWebControlDropDownList.SelectedValue = sContenido;
                    break;
                }
            }
        }
    }
Пример #32
0
        protected void removeRow(GridView gv, int rowIndex, String CityName)
        {
            try
            {
                DataTable dt = new DataTable();
                DataTable dt1 = new DataTable();

                int count = gv.Rows.Count;

                for (int i = 0; i < count - 1; i++)
                {
                    dt1.Rows.Add();
                }
                foreach (GridViewRow item in gv.Rows)
                {
                    DropDownList drpHotelName = (DropDownList)item.FindControl("drpHotelName");
                    DropDownList drpRoomType = (DropDownList)item.FindControl("drpRoomType");
                    TextBox txtCheckInDate = (TextBox)item.FindControl("txtCheckInDate");
                    TextBox txtCheckOutDate = (TextBox)item.FindControl("txtCheckOutDate");
                    TextBox txtNights = (TextBox)item.FindControl("txtNights");
                    CheckBox chk = (CheckBox)item.FindControl("chkAddToCart");

                    TextBox txtSingleRoom = (TextBox)item.FindControl("txtSingleRoom");
                    TextBox txtDoubleRoom = (TextBox)item.FindControl("txtDoubleRoom");
                    TextBox txtTripleRoom = (TextBox)item.FindControl("txtTripleRoom");

                    RadioButton rdoConfirm = (RadioButton)item.FindControl("rdoConfirm");

                    if (dt.Columns.Count == 0)
                    {
                        dt.Columns.Add("HotelName");
                        dt.Columns.Add("RoomType");
                        dt.Columns.Add("CheckInDate");
                        dt.Columns.Add("CheckOutDate");
                        dt.Columns.Add("Nights");
                        dt.Columns.Add("AddCart");
                        dt.Columns.Add("SingleRoom");
                        dt.Columns.Add("DoubleRoom");
                        dt.Columns.Add("TripleRoom");
                    }

                    DataRow dr = dt.NewRow();
                    dr["HotelName"] = drpHotelName.Text;
                    dr["RoomType"] = drpRoomType.Text;
                    dr["CheckInDate"] = txtCheckInDate.Text;
                    dr["CheckOutDate"] = txtCheckOutDate.Text;
                    dr["Nights"] = txtNights.Text;

                    if (chk.Checked)
                    {
                        dr["AddCart"] = "True";
                    }
                    else
                    {
                        dr["AddCart"] = "False";
                    }
                    dr["SingleRoom"] = txtSingleRoom.Text;
                    dr["DoubleRoom"] = txtDoubleRoom.Text;
                    dr["TripleRoom"] = txtTripleRoom.Text;

                    dt.Rows.Add(dr);

                }

                gv.DataSource = dt1;
                gv.DataBind();


                foreach (GridViewRow item in gv.Rows)
                {
                    int itm = item.DataItemIndex;
                    if (itm >= rowIndex)
                    {
                        itm = itm + 1;
                    }

                    DropDownList drpHotelName = (DropDownList)item.FindControl("drpHotelName");
                    DropDownList drpRoomType = (DropDownList)item.FindControl("drpRoomType");
                    TextBox txtCheckInDate = (TextBox)item.FindControl("txtCheckInDate");
                    TextBox txtCheckOutDate = (TextBox)item.FindControl("txtCheckOutDate");
                    TextBox txtNights = (TextBox)item.FindControl("txtNights");
                    CheckBox chk = (CheckBox)item.FindControl("chkAddToCart");
                    TextBox txtSingleRoom = (TextBox)item.FindControl("txtSingleRoom");
                    TextBox txtDoubleRoom = (TextBox)item.FindControl("txtDoubleRoom");
                    TextBox txtTripleRoom = (TextBox)item.FindControl("txtTripleRoom");

                    DataSet ds = objGitDetail.fetchComboDataforHotel("FETCH_HOTEL_NAME_FOR_GIT_CITY_WISE", CityName);

                    binddropdownlist(drpHotelName, ds);
                    drpHotelName.Text = dt.Rows[itm]["HotelName"].ToString();

                    if (drpHotelName.Text != "")
                    {
                        DataSet ds1 = objGitDetail.fetchComboDataforHotelroomtype("FETCH_ROOM_TYPE_FOR_GIT_HOTEL_WISE", drpHotelName.Text, CityName);

                        binddropdownlist(drpRoomType, ds1);

                        drpRoomType.Text = dt.Rows[itm]["RoomType"].ToString();
                    }
                    txtCheckInDate.Text = dt.Rows[itm]["CheckInDate"].ToString();
                    txtCheckOutDate.Text = dt.Rows[itm]["CheckOutDate"].ToString();
                    txtNights.Text = dt.Rows[itm]["Nights"].ToString();

                    if (dt.Rows[itm]["AddCart"].ToString() == "True")
                    {
                        chk.Checked = true;
                    }
                    else
                    {
                        chk.Checked = false;
                    }
                    txtSingleRoom.Text = dt.Rows[itm]["SingleRoom"].ToString();
                    txtDoubleRoom.Text = dt.Rows[itm]["DoubleRoom"].ToString();
                    txtTripleRoom.Text = dt.Rows[itm]["TripleRoom"].ToString();
                }
                if (Session["OrderStatus"].ToString() == "In Process")
                {
                    Button RateButton = new Button();


                    for (int i = 0; i < gv.Rows.Count; i++)
                    {
                        RateButton = (Button)gv.Rows[i].FindControl("btnHotelRate");
                        RateButton.Visible = false;

                    }
                }
                else if (Session["OrderStatus"].ToString() == "Booked")
                {
                    RadioButton ConfirmrdoButton = new RadioButton();

                    for (int i = 0; i < gv.Rows.Count; i++)
                    {
                        ConfirmrdoButton = (RadioButton)gv.Rows[i].FindControl("rdoConfirm");
                        ConfirmrdoButton.Visible = true;

                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {

            }
        }
Пример #33
0
    protected void submit_button(object sender, EventArgs e)
    {
        using (SqlConnection con = new SqlConnection(conString))
        {
            //string strDate = DateTime.Now.ToString("yyyy-MM-dd");
            string datedari = TextBox1.Text;

            DateTime dt       = DateTime.ParseExact(datedari, "dd/mm/yyyy", CultureInfo.InvariantCulture);
            String   datetime = dt.ToString("yyyy-mm-dd");
            if (s_update.Checked == true)
            {
                gvSelected.AllowPaging = false;
                savechkdvls();
                this.grid();
                gvSelected.DataBind();
                chkdvaluesp();
                int[] no = new int[gvSelected.Rows.Count];
                int   i  = 0;

                foreach (GridViewRow gvrow in gvSelected.Rows)
                {
                    var no_kp  = gvrow.FindControl("Label2") as System.Web.UI.WebControls.Label;
                    var txn_dt = gvrow.FindControl("Label1_dt") as System.Web.UI.WebControls.Label;
                    var caw    = gvrow.FindControl("Label4") as System.Web.UI.WebControls.Label;
                    var pus    = gvrow.FindControl("Label5") as System.Web.UI.WebControls.Label;
                    System.Web.UI.WebControls.RadioButton chkbox  = (System.Web.UI.WebControls.RadioButton)gvrow.FindControl("chkSelect_1");
                    System.Web.UI.WebControls.RadioButton chkbox1 = (System.Web.UI.WebControls.RadioButton)gvrow.FindControl("chkSelect_2");
                    //if(chkbox1.Checked == true)
                    //{
                    //    chkbox.Checked = false;
                    //}
                    if (chkbox.Checked == true || chkbox1.Checked == true)
                    {
                        //Update Fee Status

                        string text1 = string.Empty, text2 = string.Empty;
                        if (chkbox.Checked == true)
                        {
                            text1 = "SA";
                            text2 = "N";
                        }
                        else
                        {
                            text1 = "";
                            text2 = "";
                        }
                        SqlCommand up_status = new SqlCommand("UPDATE mem_fee SET [fee_refund_ind]= @fee_refund_ind ,[fee_sts_cd] = @fee_sts_cd, [fee_approval_dt] = @fee_approval_dt WHERE fee_new_icno='" + no_kp.Text + "' and Acc_sts ='Y'", con);
                        up_status.Parameters.AddWithValue("fee_refund_ind", text2);
                        up_status.Parameters.AddWithValue("fee_sts_cd", text1);
                        up_status.Parameters.AddWithValue("fee_approval_dt", datetime);
                        con.Open();
                        int j = up_status.ExecuteNonQuery();
                        con.Close();

                        //Update share Status

                        SqlCommand SA_status = new SqlCommand("UPDATE mem_share SET [sha_refund_ind]=@sha_refund_ind,[sha_approve_sts_cd] = @sha_approve_sts_cd, [sha_approve_dt] = @sha_approve_dt WHERE sha_new_icno='" + no_kp.Text + "' and sha_txn_dt='" + txn_dt.Text + "' and Acc_sts ='Y'", con);
                        SA_status.Parameters.AddWithValue("sha_refund_ind", text2);
                        SA_status.Parameters.AddWithValue("sha_approve_sts_cd", text1);
                        SA_status.Parameters.AddWithValue("sha_approve_dt", datetime);
                        SA_status.Parameters.AddWithValue("sha_upd_id", Session["New"].ToString());
                        SA_status.Parameters.AddWithValue("sha_upd_dt", datetime);
                        con.Open();
                        int k = SA_status.ExecuteNonQuery();
                        con.Close();

                        //update pst table set flag '0'

                        if (chkbox1.Checked == true)
                        {
                            DataTable dtpst = new DataTable();
                            dtpst = DBCon.Ora_Execute_table("Update aim_pst SET Flag_set='0',pst_upd_dt='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',pst_upd_id='" + Session["New"].ToString() + "' where pst_withdrawal_type_cd='WSYE' and pst_new_icno='" + no_kp.Text + "' and Acc_sts ='Y' and Flag_set='1'");
                        }

                        //Update Membership Status & Membership No

                        var       s_id  = gvrow.FindControl("Label6") as System.Web.UI.WebControls.Label;
                        DataTable DTMEM = new DataTable();
                        DTMEM = DBCon.Ora_Execute_table("SELECT mem_applicant_type_cd,mem_name FROM  mem_member WHERE mem_staff_ind= '" + s_id.Text + "' and mem_new_icno='" + no_kp.Text + "' and Acc_sts ='Y'");

                        if (chkbox.Checked == true)
                        {
                            if (DTMEM.Rows[0][0].ToString() == "SH")
                            {
                                DataTable dtgen = new DataTable();
                                dtgen = DBCon.Ora_Execute_table("select max(mem_member_no) mem_member_no  from mem_member where mem_applicant_type_cd='SH'");
                                if (dtgen.Rows[0][0].ToString() != "")
                                {
                                    string nyNumber = dtgen.Rows[0][0].ToString();
                                    string mm       = nyNumber.Substring(1, nyNumber.Length - 1);
                                    int    number   = Convert.ToInt32(mm) + 1;
                                    string value2   = "S" + (number.ToString()).PadLeft(6, '0');

                                    count_text = value2;
                                }
                                else
                                {
                                    count_text = "S000001";
                                }
                            }
                            else
                            {
                                DataTable dtgen = new DataTable();
                                dtgen = DBCon.Ora_Execute_table("select max(mem_member_no) mem_member_no  from mem_member where mem_applicant_type_cd in ('SA','BD','SK')");
                                if (dtgen.Rows[0][0].ToString() != "")
                                {
                                    string nyNumber = dtgen.Rows[0][0].ToString();
                                    string mm       = nyNumber.Substring(1, nyNumber.Length - 1);
                                    int    number   = Convert.ToInt32(mm) + 1;
                                    string value2   = "K" + (number.ToString()).PadLeft(6, '0');
                                    count_text = value2;
                                }
                                else
                                {
                                    count_text = "K000001";
                                }
                            }
                        }
                        else if (chkbox1.Checked == true)
                        {
                            count_text = "";
                        }
                        else
                        {
                            object count = "";
                            count_text = count.ToString();
                        }


                        String mem_text1 = Session["New"].ToString();

                        SqlCommand up_mem = new SqlCommand("UPDATE mem_member SET [mem_member_no] = @mem_member_no, [mem_sts_cd] = @mem_sts_cd, [mem_register_dt] = @mem_register_dt, [mem_upd_id] = @mem_upd_id, [mem_upd_dt] = @mem_upd_dt WHERE mem_new_icno='" + no_kp.Text + "' and Acc_sts ='Y'", con);
                        up_mem.Parameters.AddWithValue("mem_member_no", count_text);
                        con.Close();
                        up_mem.Parameters.AddWithValue("mem_sts_cd", text1);
                        up_mem.Parameters.AddWithValue("mem_register_dt", datetime);
                        up_mem.Parameters.AddWithValue("mem_upd_id", mem_text1);
                        up_mem.Parameters.AddWithValue("mem_upd_dt", DateTime.Now);
                        con.Open();
                        int s = up_mem.ExecuteNonQuery();
                        con.Close();


                        // create member login

                        if (chkbox.Checked == true)
                        {
                            DataTable ddlvl2 = new DataTable();
                            ddlvl2 = DBCon.Ora_Execute_table("select * from KK_User_Login where KK_userid='" + no_kp.Text + "'");
                            if (ddlvl2.Rows.Count == 0)
                            {
                                DataTable ddlvl2_role = new DataTable();
                                ddlvl2_role = DBCon.Ora_Execute_table("select * from KK_PID_Kumpulan where KK_kumpulan_id='R0025'");

                                string Inssql = "insert into KK_User_Login(KK_userid,KK_password,KK_username,KK_roles,KK_skrins,Status,KK_crt_id,KK_crt_dt) values ('" + no_kp.Text + "','12345','" + DTMEM.Rows[0]["mem_name"].ToString() + "','" + ddlvl2_role.Rows[0]["KK_kumpulan_id"].ToString() + "','" + ddlvl2_role.Rows[0]["KK_kumpulan_screen"].ToString() + "','A','" + userid + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')";
                                Status = DBCon.Ora_Execute_CommamdText(Inssql);
                            }
                        }
                    }
                }
                gvSelected.AllowPaging = true;

                //gvSelected.DataBind();
                //}
                //gvSelected.SetPageIndex(a);
            }
            else
            {
                foreach (GridViewRow gvrow in gvSelected.Rows)
                {
                    var no_kp  = gvrow.FindControl("Label2") as System.Web.UI.WebControls.Label;
                    var txn_dt = gvrow.FindControl("Label1_dt") as System.Web.UI.WebControls.Label;
                    var caw    = gvrow.FindControl("Label4") as System.Web.UI.WebControls.Label;
                    var pus    = gvrow.FindControl("Label5") as System.Web.UI.WebControls.Label;
                    System.Web.UI.WebControls.RadioButton chkbox  = (System.Web.UI.WebControls.RadioButton)gvrow.FindControl("chkSelect_1");
                    System.Web.UI.WebControls.RadioButton chkbox1 = (System.Web.UI.WebControls.RadioButton)gvrow.FindControl("chkSelect_2");
                    if (chkbox.Checked == true || chkbox1.Checked == true)
                    {
                        //Update Fee Status

                        string text1 = string.Empty, text2 = string.Empty;
                        if (chkbox.Checked == true)
                        {
                            text1 = "SA";
                            text2 = "N";
                        }
                        else
                        {
                            text1 = "";
                            text2 = "";
                        }
                        SqlCommand up_status = new SqlCommand("UPDATE mem_fee SET [fee_refund_ind]= @fee_refund_ind ,[fee_sts_cd] = @fee_sts_cd, [fee_approval_dt] = @fee_approval_dt WHERE fee_new_icno='" + no_kp.Text + "' and Acc_sts ='Y'", con);
                        up_status.Parameters.AddWithValue("fee_refund_ind", text2);
                        up_status.Parameters.AddWithValue("fee_sts_cd", text1);
                        up_status.Parameters.AddWithValue("fee_approval_dt", datetime);
                        con.Open();
                        int j = up_status.ExecuteNonQuery();
                        con.Close();

                        //Update share Status

                        SqlCommand SA_status = new SqlCommand("UPDATE mem_share SET [sha_refund_ind]=@sha_refund_ind,[sha_approve_sts_cd] = @sha_approve_sts_cd, [sha_approve_dt] = @sha_approve_dt WHERE sha_new_icno='" + no_kp.Text + "' and sha_txn_dt='" + txn_dt.Text + "' and Acc_sts ='Y'", con);
                        SA_status.Parameters.AddWithValue("sha_refund_ind", text2);
                        SA_status.Parameters.AddWithValue("sha_approve_sts_cd", text1);
                        SA_status.Parameters.AddWithValue("sha_approve_dt", datetime);
                        SA_status.Parameters.AddWithValue("sha_upd_id", Session["New"].ToString());
                        SA_status.Parameters.AddWithValue("sha_upd_dt", datetime);
                        con.Open();
                        int k = SA_status.ExecuteNonQuery();
                        con.Close();

                        //update pst table set flag '0'

                        if (chkbox1.Checked == true)
                        {
                            DataTable dtpst = new DataTable();
                            dtpst = DBCon.Ora_Execute_table("Update aim_pst SET Flag_set='0',pst_upd_dt='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',pst_upd_id='" + Session["New"].ToString() + "' where pst_withdrawal_type_cd='WSYE' and pst_new_icno='" + no_kp.Text + "' and Acc_sts ='Y' and Flag_set='1'");
                        }

                        //Update Membership Status & Membership No

                        var       s_id  = gvrow.FindControl("Label6") as System.Web.UI.WebControls.Label;
                        DataTable DTMEM = new DataTable();
                        DTMEM = DBCon.Ora_Execute_table("SELECT mem_applicant_type_cd,mem_name FROM  mem_member WHERE mem_staff_ind= '" + s_id.Text + "' and mem_new_icno='" + no_kp.Text + "' and Acc_sts ='Y'");

                        if (chkbox.Checked == true)
                        {
                            if (DTMEM.Rows[0][0].ToString() == "SH")
                            {
                                DataTable dtgen = new DataTable();
                                dtgen = DBCon.Ora_Execute_table("select max(mem_member_no) mem_member_no  from mem_member where mem_applicant_type_cd='SH'");
                                if (dtgen.Rows[0][0].ToString() != "")
                                {
                                    string nyNumber = dtgen.Rows[0][0].ToString();
                                    string mm       = nyNumber.Substring(1, nyNumber.Length - 1);
                                    int    number   = Convert.ToInt32(mm) + 1;
                                    string value2   = "S" + (number.ToString()).PadLeft(6, '0');

                                    count_text = value2;
                                }
                                else
                                {
                                    count_text = "S000001";
                                }
                            }
                            else
                            {
                                DataTable dtgen = new DataTable();
                                dtgen = DBCon.Ora_Execute_table("select max(mem_member_no) mem_member_no  from mem_member where mem_applicant_type_cd in ('SA','BD','SK')");
                                if (dtgen.Rows[0][0].ToString() != "")
                                {
                                    string nyNumber = dtgen.Rows[0][0].ToString();
                                    string mm       = nyNumber.Substring(1, nyNumber.Length - 1);
                                    int    number   = Convert.ToInt32(mm) + 1;
                                    string value2   = "K" + (number.ToString()).PadLeft(6, '0');
                                    count_text = value2;
                                }
                                else
                                {
                                    count_text = "K000001";
                                }
                            }
                        }
                        else if (chkbox1.Checked == true)
                        {
                            count_text = "";
                        }
                        else
                        {
                            object count = "";
                            count_text = count.ToString();
                        }


                        String mem_text1 = Session["New"].ToString();

                        SqlCommand up_mem = new SqlCommand("UPDATE mem_member SET [mem_member_no] = @mem_member_no, [mem_sts_cd] = @mem_sts_cd, [mem_register_dt] = @mem_register_dt, [mem_upd_id] = @mem_upd_id, [mem_upd_dt] = @mem_upd_dt WHERE mem_new_icno='" + no_kp.Text + "' and Acc_sts ='Y'", con);
                        up_mem.Parameters.AddWithValue("mem_member_no", count_text);
                        con.Close();
                        up_mem.Parameters.AddWithValue("mem_sts_cd", text1);
                        up_mem.Parameters.AddWithValue("mem_register_dt", datetime);
                        up_mem.Parameters.AddWithValue("mem_upd_id", mem_text1);
                        up_mem.Parameters.AddWithValue("mem_upd_dt", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                        con.Open();
                        int s = up_mem.ExecuteNonQuery();
                        con.Close();


                        // create member login

                        if (chkbox.Checked == true)
                        {
                            DataTable ddlvl2 = new DataTable();
                            ddlvl2 = DBCon.Ora_Execute_table("select * from KK_User_Login where KK_userid='" + no_kp.Text + "'");
                            if (ddlvl2.Rows.Count == 0)
                            {
                                DataTable ddlvl2_role = new DataTable();
                                ddlvl2_role = DBCon.Ora_Execute_table("select * from KK_PID_Kumpulan where KK_kumpulan_id='R0016'");

                                string Inssql = "insert into KK_User_Login(KK_userid,KK_password,KK_username,KK_roles,KK_skrins,Status,KK_crt_id,KK_crt_dt,KK_user_type) values ('" + no_kp.Text + "','12345','" + DTMEM.Rows[0]["mem_name"].ToString() + "','" + ddlvl2_role.Rows[0]["KK_kumpulan_id"].ToString() + "','" + ddlvl2_role.Rows[0]["KK_kumpulan_screen"].ToString() + "','A','" + userid + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','Y')";
                                Status = DBCon.Ora_Execute_CommamdText(Inssql);
                            }
                        }
                    }
                }
            }

            // Integration Part


            DataTable ddmem = new DataTable();
            ddmem = DBCon.Ora_Execute_table("select mem_batch_name,Format(mem_upd_dt,'yyyy-MM-dd') mem_upd_dt,count(mem_new_icno) cnt,sum(cast(mem_fee_amount as money)) fi_amt from mem_member WHERE mem_batch_name='" + DropDownList1.SelectedValue + "' and mem_sts_cd='SA' and Format(mem_upd_dt,'yyyy-MM-dd')='" + DateTime.Now.ToString("yyyy-MM-dd") + "' and Acc_sts ='Y' group by mem_batch_name,Format(mem_upd_dt,'yyyy-MM-dd')");
            DataTable ddsha = new DataTable();
            ddsha = DBCon.Ora_Execute_table("select sha_batch_name,count(sha_new_icno) cnt,sum(cast(sha_debit_amt as money)) syer_amt from mem_share WHERE sha_batch_name='" + DropDownList1.SelectedValue + "' and sha_approve_sts_cd='SA' and Acc_sts ='Y' group by sha_batch_name");

            if (ddmem.Rows.Count != 0)
            {
                userid = Session["New"].ToString();
                GetUniqueInv();
                //fi masuk

                DataTable get_inter_info_fm = dbcon.Ora_Execute_table("select jur_module,jur_item,jur_desc,jur_desc_cd from KW_ref_jurnal_inter where jur_module='M0007' and jur_item='CARUMAN ANGGOTA' and jur_desc_cd='01'");

                string Inssql_fm = "Insert into KW_jurnal_inter (no_permohonan,no_Rujukan,tarikh_lulus,Terma,Jenis_permohonan,perkara,nama_pelanggan_code,Overall,Status,crt_id,cr_dt) "
                                   + " Values ('" + unq_id1 + "','" + ddmem.Rows[0]["mem_batch_name"].ToString() + "','" + ddmem.Rows[0]["mem_upd_dt"].ToString() + "','30','12', "
                                   + " '" + get_inter_info_fm.Rows[0]["jur_desc"].ToString() + "','" + get_inter_info_fm.Rows[0]["jur_module"].ToString() + "','" + ddmem.Rows[0]["fi_amt"].ToString() + "','A','" + Session["New"].ToString() + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')";
                Status = DBCon.Ora_Execute_CommamdText(Inssql_fm);

                string Inssql_fm_items = "Insert into KW_jurnal_inter_items (no_permohonan,keterangan,jumlah,Overall,Status,crt_id,cr_dt) "
                                         + " Values ('" + unq_id1 + "','" + get_inter_info_fm.Rows[0]["jur_desc"].ToString() + "','" + ddmem.Rows[0]["cnt"].ToString() + "','" + ddmem.Rows[0]["fi_amt"].ToString() + "','A','" + Session["New"].ToString() + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')";
                Status = DBCon.Ora_Execute_CommamdText(Inssql_fm_items);

                //MODAL SYER

                DataTable get_inter_info_sh = dbcon.Ora_Execute_table("select jur_module,jur_item,jur_desc,jur_desc_cd from KW_ref_jurnal_inter where jur_module='M0007' and jur_item='CARUMAN ANGGOTA' and jur_desc_cd='02'");

                string Inssql_sh = "Insert into KW_jurnal_inter (no_permohonan,no_Rujukan,tarikh_lulus,Terma,Jenis_permohonan,perkara,nama_pelanggan_code,Overall,Status,crt_id,cr_dt) "
                                   + " Values ('" + unq_id2 + "','" + ddmem.Rows[0]["mem_batch_name"].ToString() + "','" + ddmem.Rows[0]["mem_upd_dt"].ToString() + "','30','13', "
                                   + " '" + get_inter_info_sh.Rows[0]["jur_desc"].ToString() + "','" + get_inter_info_sh.Rows[0]["jur_module"].ToString() + "','" + ddsha.Rows[0]["syer_amt"].ToString() + "','A','" + Session["New"].ToString() + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')";
                Status = DBCon.Ora_Execute_CommamdText(Inssql_sh);

                string Inssql_sh_items = "Insert into KW_jurnal_inter_items (no_permohonan,keterangan,jumlah,Overall,Status,crt_id,cr_dt) "
                                         + " Values ('" + unq_id2 + "','" + get_inter_info_sh.Rows[0]["jur_desc"].ToString() + "','" + ddsha.Rows[0]["cnt"].ToString() + "','" + ddsha.Rows[0]["syer_amt"].ToString() + "','A','" + Session["New"].ToString() + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')";
                Status = DBCon.Ora_Execute_CommamdText(Inssql_sh_items);

                DataTable dt_upd_format1 = dbcon.Ora_Execute_table("update KW_Format_Nombor_rujukan set cur_format='" + unq_id1 + "',upd_id='" + userid + "',upd_dt='" + DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss") + "' where doc_type_cd='12' and Status = 'A'");

                DataTable dt_upd_format2 = dbcon.Ora_Execute_table("update KW_Format_Nombor_rujukan set cur_format='" + unq_id2 + "',upd_id='" + userid + "',upd_dt='" + DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss") + "' where doc_type_cd='13' and Status = 'A'");
            }

            savechkdvls();
            grid();
            chkdvaluesp();
            Session["chkditems"] = null;
            service.audit_trail("P0122", "Simpan", "Nama Kelompok", DropDownList1.SelectedItem.Text);
            ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "$.Zebra_Dialog('Rekod Berjaya Disimpan.Maklumat Login Pengguna Berjaya Diwujudkan.',{'type': 'confirmation','title': 'Success'});", true);
        }
    }
Пример #34
0
        protected void AddHotels(GridView gv, string CityName, UpdatePanel uppanel)
        {
            try
            {

                int count = gv.Rows.Count;
                int count1 = count + 1;
                DataTable dt = new DataTable();

                DataSet ds = objGitDetail.fetchComboDataforHotel("FETCH_HOTEL_NAME_FOR_GIT_CITY_WISE", CityName);

                foreach (GridViewRow item in gv.Rows)
                {
                    DropDownList drpHotelName = (DropDownList)item.FindControl("drpHotelName");
                    DropDownList drpRoomType = (DropDownList)item.FindControl("drpRoomType");
                    TextBox txtCheckInDate = (TextBox)item.FindControl("txtCheckInDate");
                    TextBox txtCheckOutDate = (TextBox)item.FindControl("txtCheckOutDate");
                    TextBox txtNights = (TextBox)item.FindControl("txtNights");
                    CheckBox chk = (CheckBox)item.FindControl("chkAddToCart");
                    TextBox txtSingleRoom = (TextBox)item.FindControl("txtSingleRoom");
                    TextBox txtDoubleRoom = (TextBox)item.FindControl("txtDoubleRoom");
                    TextBox txtTripleRoom = (TextBox)item.FindControl("txtTripleRoom");

                    if (dt.Columns.Count == 0)
                    {
                        dt.Columns.Add("HotelName");
                        dt.Columns.Add("RoomType");
                        dt.Columns.Add("CheckInDate");
                        dt.Columns.Add("CheckOutDate");
                        dt.Columns.Add("Nights");
                        dt.Columns.Add("AddCart");
                        dt.Columns.Add("SingleRoom");
                        dt.Columns.Add("DoubleRoom");
                        dt.Columns.Add("TripleRoom");

                    }

                    DataRow dr = dt.NewRow();
                    dr["HotelName"] = drpHotelName.Text;
                    dr["RoomType"] = drpRoomType.Text;
                    dr["CheckInDate"] = txtCheckInDate.Text;
                    dr["CheckOutDate"] = txtCheckOutDate.Text;
                    dr["Nights"] = txtNights.Text;
                    dr["SingleRoom"] = txtSingleRoom.Text;
                    dr["DoubleRoom"] = txtDoubleRoom.Text;
                    dr["TripleRoom"] = txtTripleRoom.Text;

                    if (chk.Checked)
                    {
                        dr["AddCart"] = "True";
                    }
                    else
                    {
                        dr["AddCart"] = "False";
                    }
                    dt.Rows.Add(dr);

                }

                if (count == 0)
                {
                    if (dt.Columns.Count == 0)
                    {
                        dt.Columns.Add("HotelName");
                        dt.Columns.Add("RoomType");
                        dt.Columns.Add("CheckInDate");
                        dt.Columns.Add("CheckOutDate");
                        dt.Columns.Add("Nights");
                        dt.Columns.Add("AddCart");
                        dt.Columns.Add("SingleRoom");
                        dt.Columns.Add("DoubleRoom");
                        dt.Columns.Add("TripleRoom");
                    }

                    DataRow dr = dt.NewRow();
                    dr["HotelName"] = "";
                    dr["RoomType"] = "";
                    dr["CheckInDate"] = "";
                    dr["CheckOutDate"] = "";
                    dr["Nights"] = "";
                    dr["AddCart"] = "";
                    dr["SingleRoom"] = "";
                    dr["DoubleRoom"] = "";
                    dr["TripleRoom"] = "";
                    dt.Rows.Add(dr);
                    gv.DataSource = dt;
                    gv.DataBind();
                    uppanel.Update();
                }

                if (count != 0)
                {
                    DataRow dr1 = dt.NewRow();

                    dt.Rows.Add(dr1);
                }

                gv.DataSource = dt;
                gv.DataBind();


                foreach (GridViewRow item in gv.Rows)
                {
                    int itm = item.DataItemIndex;
                    DropDownList drpHotelName = (DropDownList)item.FindControl("drpHotelName");
                    DropDownList drpRoomType = (DropDownList)item.FindControl("drpRoomType");
                    TextBox txtCheckInDate = (TextBox)item.FindControl("txtCheckInDate");
                    TextBox txtCheckOutDate = (TextBox)item.FindControl("txtCheckOutDate");
                    TextBox txtNights = (TextBox)item.FindControl("txtNights");
                    CheckBox chk = (CheckBox)item.FindControl("chkAddToCart");
                    TextBox txtSingleRoom = (TextBox)item.FindControl("txtSingleRoom");
                    TextBox txtDoubleRoom = (TextBox)item.FindControl("txtDoubleRoom");
                    TextBox txtTripleRoom = (TextBox)item.FindControl("txtTripleRoom");
                    for (int k = 0; k < dt.Rows.Count; k++)
                    {
                        if (itm == k)
                        {

                            binddropdownlist(drpHotelName, ds);
                            drpHotelName.Text = dt.Rows[itm]["HotelName"].ToString();

                            if (drpHotelName.Text != "")
                            {
                                DataSet ds1 = objGitDetail.fetchComboDataforHotelroomtype("FETCH_ROOM_TYPE_FOR_GIT_HOTEL_WISE", drpHotelName.Text, CityName);

                                binddropdownlist(drpRoomType, ds1);

                                drpRoomType.Text = dt.Rows[itm]["RoomType"].ToString();
                            }
                            txtCheckInDate.Text = dt.Rows[itm]["CheckInDate"].ToString();
                            txtCheckOutDate.Text = dt.Rows[itm]["CheckOutDate"].ToString();
                            txtNights.Text = dt.Rows[itm]["Nights"].ToString();

                            if (dt.Rows[itm]["AddCart"].ToString() == "True")
                            {
                                chk.Checked = true;
                            }
                            else
                            {
                                chk.Checked = false;
                            }
                            txtSingleRoom.Text = dt.Rows[itm]["SingleRoom"].ToString();
                            txtDoubleRoom.Text = dt.Rows[itm]["DoubleRoom"].ToString();
                            txtTripleRoom.Text = dt.Rows[itm]["TripleRoom"].ToString();
                        }
                    }
                }

                if (RoleId != "18")
                {
                    Button RateButton = new Button();


                    for (int i = 0; i < gv.Rows.Count; i++)
                    {
                        RateButton = (Button)gv.Rows[i].FindControl("btnHotelRate");
                        RateButton.Visible = false;

                    }

                }

                if (RoleId == "18" && Session["OrderStatus"].ToString() != "Request for Quote")
                {
                    Button RateButton = new Button();


                    for (int i = 0; i < gv.Rows.Count; i++)
                    {
                        RateButton = (Button)gv.Rows[i].FindControl("btnHotelRate");
                        RateButton.Visible = false;

                    }
                }
                if (RoleId == "18" && (Session["OrderStatus"].ToString() == "Booked" || Session["OrderStatus"].ToString() == "To Be Reconfirmed"))
                {
                    if (ViewState["RadioBtnVsible"] != null)
                    {
                        RadioButton ConfirmrdoButton = new RadioButton();

                        for (int i = 0; i < gv.Rows.Count - 1; i++)
                        {
                            if (i == int.Parse(ViewState["RadioBtnVsible"].ToString()))
                            {
                                ConfirmrdoButton = (RadioButton)gv.Rows[i].FindControl("rdoConfirm");
                                ConfirmrdoButton.Visible = true;
                                ViewState["RadioBtnVsible"] = null;
                                break;
                            }

                        }
                    }
                }
                if (Session["OrderStatus"].ToString() == "To Be Reconfirmed")
                {
                    if (ViewState["RoomtxtVsible"] != null)
                    {
                        TextBox txtSingleRoom = new TextBox();
                        TextBox txtDoubleRoom = new TextBox();
                        TextBox txtTripleRoom = new TextBox();

                        for (int i = 0; i < gv.Rows.Count - 1; i++)
                        {
                            if (i == int.Parse(ViewState["RoomtxtVsible"].ToString()))
                            {
                                txtSingleRoom = (TextBox)gv.Rows[i].FindControl("txtSingleRoom");
                                txtSingleRoom.Visible = true;
                                txtDoubleRoom = (TextBox)gv.Rows[i].FindControl("txtDoubleRoom");
                                txtDoubleRoom.Visible = true;
                                txtTripleRoom = (TextBox)gv.Rows[i].FindControl("txtTripleRoom");
                                txtTripleRoom.Visible = true;

                                ViewState["RoomtxtVsible"] = null;
                                break;
                            }
                        }
                        if (gv.HeaderRow != null)
                        {
                            Label lblSingleRoom = (Label)gv.HeaderRow.FindControl("lblSingleRoom");
                            lblSingleRoom.Visible = true;
                            Label lblDoubleRoom = (Label)gv.HeaderRow.FindControl("lblDoubleRoom");
                            lblDoubleRoom.Visible = true;
                            Label lblTripleRoom = (Label)gv.HeaderRow.FindControl("lblTripleRoom");
                            lblTripleRoom.Visible = true;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                uppanel.Update();
            }

        }
Пример #35
0
        // NpgsqlConnection conn = new NpgsqlConnection("Server=webblabb.miun.se;Port=5432; User Id=pgmvaru_g7;Password=akrobatik;Database=pgmvaru_g7;SSL=true;");
        protected void Page_Load(object sender, EventArgs e)
        {
            //Skapar två nya xmldokument
            XmlDocument xmldoc = new XmlDocument();
            XmlDocument xmldoc2 = new XmlDocument();

            right.LoadXml("<test></test>");
            wrong.LoadXml("<test></test>");
            //Laddar in vårat xmldokument i xmldoc
            xmldoc.Load(Server.MapPath("XmlQuestions.xml"));

            //Laddar endast in taggar i xmldoc2 som är identiska med XmlQuestions.xml
            xmldoc2.LoadXml("<categories></categories>");

            //Skapar ny array och stoppar in 25 st variabler av typen int
            int[] arrayQuestions = RandomNumbers(1, 25, 4);

            //Hämtar frågor från orginaldokumentet och stoppar in detta i det nya
            foreach (int i in arrayQuestions)
            {
                XmlNode newnode = xmldoc2.ImportNode(xmldoc.SelectSingleNode("/categories/question[@id='" + i + "']"), true);
                XmlNode parent = xmldoc2.SelectSingleNode("categories");
                parent.AppendChild(newnode);
                xmldoc2.Save(Server.MapPath("usertest.xml"));
            }
            //Lägger in alla question nodes i en XML lista
            XmlNodeList lst  = xmldoc2.SelectNodes("categories/question");
            //Loopar igenom xml listan 1st
            int count = 1;
            foreach (XmlNode node in lst)
            {
                string attributeID = node.Attributes["id"].Value;
                string attributeMulti = node.Attributes["multi"].Value;
                string img = node.Attributes["image"].Value;

                    int i = Convert.ToInt16(attributeID);
                    //Skapar nya rader
                TableRow row1 = new TableRow();
                TableRow row2 = new TableRow();
                TableRow row3 = new TableRow();
                TableRow row4 = new TableRow();
                TableRow row5 = new TableRow();
                TableRow row6 = new TableRow();
                    //Skapar nya celler i raderna ovan
                TableCell cell1 = new TableCell();
                TableCell cell2 = new TableCell();
                TableCell cell3 = new TableCell();
                TableCell cell4 = new TableCell();
                TableCell cell5 = new TableCell();
                TableCell cell6 = new TableCell();
                TableCell imgcell = new TableCell();
                    //Skapar nya radiobuttons
                RadioButton radiob1 = new RadioButton();
                RadioButton radiob2 = new RadioButton();
                RadioButton radiob3 = new RadioButton();
                RadioButton radiob4 = new RadioButton();
                    //Skapar nya checkboxes
                CheckBox checkbox1 = new CheckBox();
                CheckBox checkbox2 = new CheckBox();
                CheckBox checkbox3 = new CheckBox();
                CheckBox checkbox4 = new CheckBox();
                    //Ger ett gruppnamn till radiobuttons
                radiob1.GroupName = "gr" + i.ToString();
                radiob2.GroupName = "gr" + i.ToString();
                radiob3.GroupName = "gr" + i.ToString();
                radiob4.GroupName = "gr" + i.ToString();
                    //Sätter ett unikt namn till varje radiobutton
                radiob1.ID = "raid" + i;
                    //Skapar ny label för varje fråga
                Label lblQuestion = new Label();

                    //Om frågan bara har ett svarsalternativ som är rätt
                if(attributeMulti == "false")
                {
                    lblQuestion.Text = count + ": " + (xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']").FirstChild.InnerText);

                    radiob1.Text = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id = '1']").InnerText;
                    XmlNode n = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id='1']");
                    string at = n.Attributes["correct"].Value;
                    radiob1.Attributes.Add("correct", at);

                    radiob2.Text = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id = '2']").InnerText;
                    n = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id='2']");
                    at = n.Attributes["correct"].Value;
                    radiob2.Attributes.Add("correct", at);

                    radiob3.Text = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id = '3']").InnerText;
                    n = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id='3']");
                    at = n.Attributes["correct"].Value;
                    radiob3.Attributes.Add("correct", at);

                    radiob4.Text = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id = '4']").InnerText;
                    n = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id='4']");
                    at = n.Attributes["correct"].Value;
                    radiob4.Attributes.Add("correct", at);
                        //Lägger in radiobuttons i cellerna
                    cell2.Controls.Add(radiob1);
                    cell3.Controls.Add(radiob2);
                    cell4.Controls.Add(radiob3);
                    cell5.Controls.Add(radiob4);
                }
                    //Om det är en fråga med många svarsalternativ
                if(attributeMulti == "true")
                {
                    lblQuestion.Text = count + ": " + (xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']").FirstChild.InnerText);

                    checkbox1.Text = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id = '1']").InnerText;
                    XmlNode usernode = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id='1']");
                    string at = usernode.Attributes["correct"].Value;
                    cell1.Attributes.Add("correct", at);

                    checkbox2.Text = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id = '2']").InnerText;
                    usernode = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id='2']");
                    at = usernode.Attributes["correct"].Value;
                    cell2.Attributes.Add("correct", at);

                    checkbox3.Text = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id = '3']").InnerText;
                    usernode = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id='3']");
                    at = usernode.Attributes["correct"].Value;
                    cell3.Attributes.Add("correct", at);

                    checkbox4.Text = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id = '4']").InnerText;
                    usernode = xmldoc2.SelectSingleNode("/categories/question[@id='" + i + "']/answer/answer[@id='4']");
                    at = usernode.Attributes["correct"].Value;
                    cell4.Attributes.Add("correct", at);
                        //Lägger in checkboxar i cellerna
                    cell2.Controls.Add(checkbox1);
                    cell3.Controls.Add(checkbox2);
                    cell4.Controls.Add(checkbox3);
                    cell5.Controls.Add(checkbox4);
                }
                    //Lägger in label i cellen
                cell1.Attributes.Add("class", "questionCell");
                cell1.Controls.Add(lblQuestion);
                    //Lägger in cellen på raden
                row1.Controls.Add(cell1);
                row2.Controls.Add(cell2);
                row3.Controls.Add(cell3);
                row4.Controls.Add(cell4);
                row5.Controls.Add(cell5);
                row6.Controls.Add(cell6);
                    //Lägger till attribut till de olika radobjekten
                row1.Attributes.Add("class", "question");
                table1.Controls.Add(row1);
                row2.Attributes.Add("class", "answers answer1");
                table1.Controls.Add(row2);
                row3.Attributes.Add("class", "answers answer2");
                table1.Controls.Add(row3);
                row4.Attributes.Add("class", "answers answer3");
                table1.Controls.Add(row4);
                row5.Attributes.Add("class", "answers answer4");
                table1.Controls.Add(row5);
                row6.Attributes.Add("class", "empty");
                table1.Controls.Add(row6);
                count++;
                    //Om attributet image är satt till true
                if (img == "true")
                {
                    Image bild = new Image();
                    string imagelink = xmldoc2.SelectSingleNode("categories/question[@id='" + i + "']/image").InnerText;
                    bild.ImageUrl = imagelink;
                    row1.Controls.Add(imgcell);
                    imgcell.Controls.Add(bild);
                }
            }
        }
Пример #36
0
 /// <summary>コンストラクタ</summary>
 /// <param name="tw">TextWriter</param>
 /// <param name="ctrl">RadioButton Control</param>
 public WebCustomRadioButtonHtmlTextWriter(TextWriter tw, RadioButton ctrl)
     : base(tw)
 {
     // メンバに設定
     this._ctrl = ctrl;
 }
        private TableRow GetPublishAtRow()
        {
            TableRow row = new TableRow();
            TableCell cell = new TableCell();
            Panel userControlGroup = new Panel();
            publishAtDropdown = new DropDownList();

            publishAtDropdown.ID = "ddlPublishAt";
            publishAtDropdown.Items.Insert(0, new ListItem("(None)"));
            SPListItemCollection publishAtItems = GetListItems("Organization Units", new SPQuery());

            if (publishAtItems != null)
            {
                foreach (SPListItem item in publishAtItems)
                {
                    publishAtDropdown.Items.Add(Convert.ToString(item["Title"]));
                }
            }

            optPublishAt = new RadioButton();
            optPublishAt.Text = "Publish at ";
            optPublishAt.GroupName = "nc-contentquery-search";

            userControlGroup.CssClass = "UserControlGroup";
            userControlGroup.Controls.Add(optPublishAt);
            userControlGroup.Controls.Add(publishAtDropdown);
            cell.Controls.Add(userControlGroup);

            row.Cells.Add(cell);
            return row;
        }
        //C
        protected void m_grv_unc_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            try
            {
                if (e.Row.RowType == DataControlRowType.Footer)
                {
                    DateTime v_dat_now = CIPConvert.ToDatetime(m_txt_ngay_thang.Text, "dd/MM/yyyy");
                    DateTime v_dat_dau_nam = CCommonFunction.getDate_dau_nam_from_date(v_dat_now);
                    DateTime v_dat_cuoi_nam = CCommonFunction.getDate_cuoi_nam_form_date(v_dat_now);
                    //dropdownlish cong trinh, du an
                    m_ddl_grid_edit_du_an_quoc_lo = (DropDownList)e.Row.FindControl("m_ddl_grid_du_an_quoc_lo");
                    m_ddl_grid_edit_loai_nhiem_vu = (DropDownList)e.Row.FindControl("m_ddl_grid_loai_nhiem_vu");
                    m_ddl_grid_edit_du_an = (DropDownList)e.Row.FindControl("m_ddl_grid_du_an");
                    if (m_ddl_grid_edit_du_an == null) return;

                    WebformControls.load_data_to_ddl_loai_nhiem_vu(m_ddl_grid_edit_loai_nhiem_vu, false, true);
                    if (m_ddl_grid_edit_loai_nhiem_vu.Items.Count > 0)
                    {
                        m_ddl_grid_edit_loai_nhiem_vu.SelectedIndex = 0;
                        WebformControls.load_data_to_ddl_quoc_lo_cong_trinh(v_dat_dau_nam, v_dat_cuoi_nam, CIPConvert.ToDecimal(m_ddl_don_vi.SelectedValue)
                            , CIPConvert.ToDecimal(m_ddl_grid_edit_loai_nhiem_vu.SelectedValue)
                            , m_ddl_grid_edit_du_an_quoc_lo);
                        if (m_ddl_grid_edit_du_an_quoc_lo.Items.Count > 0)
                        {
                            m_ddl_grid_edit_du_an_quoc_lo.SelectedIndex = 0;
                            WebformControls.load_data_to_ddl_ten_du_an(v_dat_dau_nam, v_dat_cuoi_nam, CIPConvert.ToDecimal(m_ddl_don_vi.SelectedValue),
                                CIPConvert.ToDecimal(m_ddl_grid_edit_du_an_quoc_lo.SelectedValue)
                                , CIPConvert.ToDecimal(m_ddl_grid_edit_loai_nhiem_vu.SelectedValue)
                                , m_ddl_grid_edit_du_an);
                        }
                    }
                    //dropdownlist Loai khoan muc -tieu muc
                    DropDownList m_ddl_grid_muc_tieu_muc = (DropDownList)e.Row.FindControl("m_ddl_grid_muc_tieu_muc");
                    m_ddl_grid_muc_tieu_muc.Visible = false;

                    load_data_to_ddl_muc_tieu_muc(m_ddl_grid_muc_tieu_muc
                        , CIPConvert.ToDecimal(m_ddl_grid_edit_loai_nhiem_vu.SelectedValue));

                }
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    if (m_grv_unc.DataKeys[e.Row.RowIndex].Value.ToString().Trim().Equals("") |
                        m_grv_unc.DataKeys[e.Row.RowIndex].Value.ToString().Trim().Equals("-1"))
                    {
                        e.Row.Font.Bold = true;
                        return;
                    }
                    if (CIPConvert.ToDecimal(m_grv_unc.DataKeys[e.Row.RowIndex].Value) > 20000)
                    {
                        return;
                    }
                    US_GD_CHI_TIET_GIAI_NGAN v_us = new US_GD_CHI_TIET_GIAI_NGAN(CIPConvert.ToDecimal(m_grv_unc.DataKeys[e.Row.RowIndex].Value));
                    DateTime v_dat_now = CIPConvert.ToDatetime(m_txt_ngay_thang.Text, "dd/MM/yyyy");
                    DateTime v_dat_dau_nam = v_dat_now.AddDays(-v_dat_now.Day + 1);
                    v_dat_dau_nam = v_dat_dau_nam.AddMonths(-v_dat_dau_nam.Month + 1);
                    //dropdownlist Cong trinh, du an
                    DateTime v_dat_cuoi_nam = v_dat_dau_nam.AddYears(1);
                    m_ddl_grid_edit_du_an_quoc_lo = (DropDownList)e.Row.FindControl("m_ddl_grid_edit_du_an_quoc_lo");
                    m_ddl_grid_edit_loai_nhiem_vu = (DropDownList)e.Row.FindControl("m_ddl_grid_edit_loai_nhiem_vu");
                    m_ddl_grid_edit_du_an = (DropDownList)e.Row.FindControl("m_ddl_grid_edit_du_an");
                    m_ddl_grid_edit_muc_tieu_muc = (DropDownList)e.Row.FindControl("m_ddl_grid_edit_muc_tieu_muc");
                    m_rdb_grid_edit_theo_quoc_lo_cong_trinh = (RadioButton)e.Row.FindControl("m_rdb_grid_edit_theo_quoc_lo_cong_trinh");
                    m_rdb_grid_edit_theo_chuong_loai_khoan_muc = (RadioButton)e.Row.FindControl("m_rdb_grid_edit_theo_chuong_loai_khoan_muc");
                    if (m_ddl_grid_edit_du_an == null) return;

                    WebformControls.load_data_to_ddl_loai_nhiem_vu(m_ddl_grid_edit_loai_nhiem_vu, false, true);
                    m_ddl_grid_edit_loai_nhiem_vu.SelectedValue = v_us.dcID_LOAI_NHIEM_VU.ToString();
                    load_data_to_ddl_muc_tieu_muc(m_ddl_grid_edit_muc_tieu_muc
                                , CIPConvert.ToDecimal(m_ddl_grid_edit_loai_nhiem_vu.SelectedValue)
                            );
                    if (v_us.IsID_CHUONGNull())
                    {
                        m_rdb_grid_edit_theo_quoc_lo_cong_trinh.Checked = true;
                        m_rdb_grid_edit_theo_chuong_loai_khoan_muc.Checked = false;
                        if (m_ddl_grid_edit_loai_nhiem_vu.Items.Count > 0)
                        {
                            m_ddl_grid_edit_loai_nhiem_vu.SelectedValue = v_us.dcID_LOAI_NHIEM_VU.ToString();
                            WebformControls.load_data_to_ddl_quoc_lo_cong_trinh(v_dat_dau_nam, v_dat_cuoi_nam, CIPConvert.ToDecimal(m_ddl_don_vi.SelectedValue)
                                , CIPConvert.ToDecimal(m_ddl_grid_edit_loai_nhiem_vu.SelectedValue)
                                , m_ddl_grid_edit_du_an_quoc_lo);
                            if (m_ddl_grid_edit_du_an_quoc_lo.Items.Count > 0)
                            {
                                m_ddl_grid_edit_du_an_quoc_lo.SelectedValue = v_us.dcID_CONG_TRINH.ToString();
                                WebformControls.load_data_to_ddl_ten_du_an(v_dat_dau_nam, v_dat_cuoi_nam, CIPConvert.ToDecimal(m_ddl_don_vi.SelectedValue),
                                    CIPConvert.ToDecimal(m_ddl_grid_edit_du_an_quoc_lo.SelectedValue)
                                    , CIPConvert.ToDecimal(m_ddl_grid_edit_loai_nhiem_vu.SelectedValue)
                                    , m_ddl_grid_edit_du_an);
                                m_ddl_grid_edit_du_an.SelectedValue = v_us.dcID_DU_AN.ToString(); ;
                            }
                        }
                        m_ddl_grid_edit_muc_tieu_muc.Visible = false;
                        m_ddl_grid_edit_du_an_quoc_lo.Visible = true;
                        m_ddl_grid_edit_du_an.Visible = true;
                    }
                    else
                    {
                        m_rdb_grid_edit_theo_quoc_lo_cong_trinh.Checked = false;
                        m_rdb_grid_edit_theo_chuong_loai_khoan_muc.Checked = true;
                        //dropdownlist muc - tieu muc

                        if (m_ddl_grid_edit_muc_tieu_muc != null)
                        {
                            string v_str_id_mix = get_id_mix_from_id_gd(v_us.dcID);

                            m_ddl_grid_edit_muc_tieu_muc.SelectedValue = v_str_id_mix;
                        }
                        m_ddl_grid_edit_muc_tieu_muc.Visible = true;
                        m_ddl_grid_edit_du_an_quoc_lo.Visible = false;
                        m_ddl_grid_edit_du_an.Visible = false;
                    }
                }
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(this, v_e);
            }
        }
Пример #39
0
    private void Data2Page(string rCaseId, string rONA000)
    {
        string rUA = Request.QueryString["UA"] + "";

        GBClass001 SBApp = new GBClass001();

        if (rONA000 == "" || rONA000 == "ADDNEW")
        {
            rONA000       = GetONAID();
            LBONA001.Text = rONA000;

            if (rUA == "")
            {
            }
            else
            {
                TXTSWC002.Text    = rUA;
                LBSWC002.Text     = rUA;
                TXTSWC002.Visible = false;
                LBSWC002.Visible  = true;
            }
        }
        else
        {
            LBONA001.Text = rONA000;

            ConnectionStringSettings connectionString = ConfigurationManager.ConnectionStrings["SWCConnStr"];
            using (SqlConnection SwcConn = new SqlConnection(connectionString.ConnectionString))
            {
                SwcConn.Open();

                string strSQLRV = " select * from OnlineApply01 ";
                strSQLRV = strSQLRV + "   where ONA01001 = '" + rONA000 + "' ";

                SqlDataReader readerOA1;
                SqlCommand    objCmdSWC = new SqlCommand(strSQLRV, SwcConn);
                readerOA1 = objCmdSWC.ExecuteReader();

                while (readerOA1.Read())
                {
                    string rSWC002   = readerOA1["SWC002"] + "";
                    string rONA01001 = readerOA1["ONA01001"] + "";
                    string rONA01002 = readerOA1["ONA01002"] + "";
                    string rONA01003 = readerOA1["ONA01003"] + "";
                    string rONA01004 = readerOA1["ONA01004"] + "";
                    string rONA01005 = readerOA1["ONA01005"] + "";
                    string rONA01006 = readerOA1["ONA01006"] + "";
                    string rONA01007 = readerOA1["ONA01007"] + "";
                    string rONA01008 = readerOA1["ONA01008"] + "";
                    string rONA01009 = readerOA1["ONA01009"] + "";
                    string rONA01010 = readerOA1["ONA01010"] + "";
                    string rONA01011 = readerOA1["ONA01011"] + "";
                    string rONA01012 = readerOA1["ONA01012"] + "";
                    string rONA01013 = readerOA1["ONA01013"] + "";
                    string rONA01014 = readerOA1["ONA01014"] + "";
                    string rONA01015 = readerOA1["ONA01015"] + "";
                    string rONA01016 = readerOA1["ONA01016"] + "";
                    string rONA01017 = readerOA1["ONA01017"] + "";
                    string rONA01018 = readerOA1["ONA01018"] + "";
                    string rONA01019 = readerOA1["ONA01019"] + "";
                    string rONA01020 = readerOA1["ONA01020"] + "";
                    string rONA01021 = readerOA1["ONA01021"] + "";
                    string rONA01022 = readerOA1["ONA01022"] + "";
                    string rONA01023 = readerOA1["ONA01023"] + "";
                    string rONA01024 = readerOA1["ONA01024"] + "";
                    string rONA01025 = readerOA1["ONA01025"] + "";

                    TXTSWC002.Text = rSWC002;
                    LBONA001.Text  = rONA01001;
                    TXTONA002.Text = SBApp.DateView(rONA01002, "00");
                    TXTONA003.Text = rONA01003;
                    TXTONA004.Text = rONA01004;
                    TXTONA005.Text = rONA01005;
                    TXTONA006.Text = rONA01006;
                    TXTONA007.Text = rONA01007;
                    TXTONA022.Text = rONA01022;
                    TXTONA024.Text = SBApp.DateView(rONA01024, "00");
                    TXTONA025.Text = rONA01025;

                    //點選處理
                    string[] arrayRadioValue = new string[] { rONA01008, rONA01009, rONA01010, rONA01011, rONA01012, rONA01013, rONA01014, rONA01015, rONA01016, rONA01017, rONA01018, rONA01019, rONA01020, rONA01021, rONA01023 };
                    System.Web.UI.WebControls.RadioButton[] arrayRadioA = new System.Web.UI.WebControls.RadioButton[] { RaONA008a, RaONA009a, RaONA010a, RaONA011a, RaONA012a, RaONA013a, RaONA014a, RaONA015a, RaONA016a, RaONA017a, RaONA018a, RaONA019a, RaONA020a, RaONA021a, RaONA023a };
                    System.Web.UI.WebControls.RadioButton[] arrayRadioB = new System.Web.UI.WebControls.RadioButton[] { RaONA008b, RaONA009b, RaONA010b, RaONA011b, RaONA012b, RaONA013b, RaONA014b, RaONA015b, RaONA016b, RaONA017b, RaONA018b, RaONA019b, RaONA020b, RaONA021b, RaONA023b };

                    for (int i = 0; i < arrayRadioValue.Length; i++)
                    {
                        string aValue = arrayRadioValue[i];
                        System.Web.UI.WebControls.RadioButton aRadioA = arrayRadioA[i];
                        System.Web.UI.WebControls.RadioButton aRadioB = arrayRadioB[i];

                        switch (aValue)
                        {
                        case "1":
                            aRadioA.Checked = true;
                            break;

                        case "0":
                            aRadioB.Checked = true;
                            break;
                        }
                    }
                }
            }
        }
    }
Пример #40
0
		private void RunDesignTimeTests()
		{
			try
			{
				this.DataGrid1.DataSource = WebControl_Attributes.m_dataSource;
				this.DataGrid2.DataSource = WebControl_Attributes.m_dataSource;
				this.DataList1.DataSource = WebControl_Attributes.m_dataSource;
				this.DataList2.DataSource = WebControl_Attributes.m_dataSource;
				this.DataGrid1.DataBind();
				this.DataGrid2.DataBind();
				this.DataList1.DataBind();
				this.DataList2.DataBind();
				GHTSubTest test1 = this.GHTSubTest25;
				WebControl control1 = this.Button1;
				this.AddAttributes(ref test1, ref control1);
				this.Button1 = (Button) control1;
				this.GHTSubTest25 = test1;
				test1 = this.GHTSubTest26;
				control1 = this.CheckBox1;
				this.AddAttributes(ref test1, ref control1);
				this.CheckBox1 = (CheckBox) control1;
				this.GHTSubTest26 = test1;
				test1 = this.GHTSubTest28;
				control1 = this.HyperLink1;
				this.AddAttributes(ref test1, ref control1);
				this.HyperLink1 = (HyperLink) control1;
				this.GHTSubTest28 = test1;
				test1 = this.GHTSubTest30;
				control1 = this.Image1;
				this.AddAttributes(ref test1, ref control1);
				this.Image1 = (Image) control1;
				this.GHTSubTest30 = test1;
				test1 = this.GHTSubTest32;
				control1 = this.ImageButton1;
				this.AddAttributes(ref test1, ref control1);
				this.ImageButton1 = (ImageButton) control1;
				this.GHTSubTest32 = test1;
				test1 = this.GHTSubTest34;
				control1 = this.Label1;
				this.AddAttributes(ref test1, ref control1);
				this.Label1 = (Label) control1;
				this.GHTSubTest34 = test1;
				test1 = this.GHTSubTest36;
				control1 = this.LinkButton1;
				this.AddAttributes(ref test1, ref control1);
				this.LinkButton1 = (LinkButton) control1;
				this.GHTSubTest36 = test1;
				test1 = this.GHTSubTest37;
				control1 = this.Panel1;
				this.AddAttributes(ref test1, ref control1);
				this.Panel1 = (Panel) control1;
				this.GHTSubTest37 = test1;
				test1 = this.GHTSubTest38;
				control1 = this.RadioButton1;
				this.AddAttributes(ref test1, ref control1);
				this.RadioButton1 = (RadioButton) control1;
				this.GHTSubTest38 = test1;
				test1 = this.GHTSubTest39;
				control1 = this.TextBox1;
				this.AddAttributes(ref test1, ref control1);
				this.TextBox1 = (TextBox) control1;
				this.GHTSubTest39 = test1;
				test1 = this.GHTSubTest40;
				control1 = this.DropDownList1;
				this.AddAttributes(ref test1, ref control1);
				this.DropDownList1 = (DropDownList) control1;
				this.GHTSubTest40 = test1;
				test1 = this.GHTSubTest41;
				control1 = this.ListBox1;
				this.AddAttributes(ref test1, ref control1);
				this.ListBox1 = (ListBox) control1;
				this.GHTSubTest41 = test1;
				test1 = this.GHTSubTest42;
				control1 = this.RadioButtonList1;
				this.AddAttributes(ref test1, ref control1);
				this.RadioButtonList1 = (RadioButtonList) control1;
				this.GHTSubTest42 = test1;
				test1 = this.GHTSubTest43;
				control1 = this.CheckBoxList1;
				this.AddAttributes(ref test1, ref control1);
				this.CheckBoxList1 = (CheckBoxList) control1;
				this.GHTSubTest43 = test1;
				test1 = this.GHTSubTest50;
				control1 = this.DataGrid1;
				this.AddAttributes(ref test1, ref control1);
				this.DataGrid1 = (DataGrid) control1;
				this.GHTSubTest50 = test1;
				test1 = this.GHTSubTest51;
				control1 = this.DataGrid2.Items[0];
				this.AddAttributes(ref test1, ref control1);
				this.GHTSubTest51 = test1;
				test1 = this.GHTSubTest52;
				control1 = this.DataList1;
				this.AddAttributes(ref test1, ref control1);
				this.DataList1 = (DataList) control1;
				this.GHTSubTest52 = test1;
				test1 = this.GHTSubTest53;
				control1 = this.DataList2.Items[0];
				this.AddAttributes(ref test1, ref control1);
				this.GHTSubTest53 = test1;
				test1 = this.GHTSubTest54;
				control1 = this.Table1;
				this.AddAttributes(ref test1, ref control1);
				this.Table1 = (Table) control1;
				this.GHTSubTest54 = test1;
				test1 = this.GHTSubTest55;
				control1 = this.Table5;
				this.AddAttributes(ref test1, ref control1);
				this.Table5 = (Table) control1;
				this.GHTSubTest55 = test1;
				test1 = this.GHTSubTest56;
				control1 = this.Table2;
				this.AddAttributes(ref test1, ref control1);
				this.Table2 = (Table) control1;
				this.GHTSubTest56 = test1;
				test1 = this.GHTSubTest57;
				control1 = this.Table3;
				this.AddAttributes(ref test1, ref control1);
				this.Table3 = (Table) control1;
				this.GHTSubTest57 = test1;
			}
			catch (Exception exception2)
			{
				// ProjectData.SetProjectError(exception2);
				Exception exception1 = exception2;
				this.GHTSubTestBegin();
				string text1 = string.Empty + exception1.GetType().ToString();
				text1 = text1 + " caught during preperations for design time tests.";
				text1 = text1 + "<br>Message: ";
				text1 = text1 + exception1.Message;
				text1 = text1 + "<br>Trace: ";
				text1 = text1 + exception1.StackTrace;
				this.GHTSubTestAddResult(text1);
				this.GHTSubTestEnd();
				// ProjectData.ClearProjectError();
			}
		}
Пример #41
0
		public void TextAlign_Values ()
		{
			RadioButton r = new RadioButton ();

			foreach (TextAlign ta in Enum.GetValues (typeof (TextAlign))) {
				r.TextAlign = ta;
			}
		}
Пример #42
0
        protected void addRadioButtonList(HtmlTable prevalueTable, string title, string strCheckBoxList, string checkedRadio, string className)
        {
            HtmlTableRow tr = new HtmlTableRow();
            prevalueTable.Rows.Add(tr);

            HtmlTableCell td = new HtmlTableCell();
            tr.Cells.Add(td);
            td.InnerText = title;

            td = new HtmlTableCell();
            tr.Cells.Add(td);

            foreach(string radioButtonText in strCheckBoxList.Split(',')){
                RadioButton rb = new RadioButton();
                rb.Text = radioButtonText;
                rb.ID = radioButtonText;
                rb.GroupName = className;
                rb.CssClass = className;

                if (radioButtonText == checkedRadio)
                {
                    rb.Checked = true;
                }
                td.Controls.Add(rb);

            }
        }
Пример #43
0
        private Control GetTableRadioButton(ShippingListItem shippingListItem)
        {
            var tr = new HtmlTableRow();
            var td = new HtmlTableCell();

            if (divScripts.Visible == false)
                divScripts.Visible = shippingListItem.Ext != null && shippingListItem.Ext.Type == ExtendedType.Pickpoint;

            var radioButton = new RadioButton
                {
                    GroupName = "ShippingRateGroup",
                    ID = PefiksId + shippingListItem.Id //+ "|" + shippingListItem.Rate
                };
            if (String.IsNullOrEmpty(_selectedID.Value.Replace(PefiksId, string.Empty)))
            {
                _selectedID.Value = radioButton.ID;
            }

            radioButton.Checked = radioButton.ID == _selectedID.Value;
            radioButton.Attributes.Add("onclick", "setValue(this)");

            string strShippingPrice = CatalogService.GetStringPrice(shippingListItem.Rate,
                                                                    Currency.Value,
                                                                    Currency.Iso3);
            radioButton.Text = string.Format("{0} <span class='price'>{1}</span>",
                                             shippingListItem.MethodNameRate, strShippingPrice);

            if (shippingListItem.Ext != null && shippingListItem.Ext.Type == ExtendedType.Pickpoint)
            {
                string temp;
                if (shippingListItem.Ext.Pickpointmap.IsNotEmpty())
                    temp = string.Format(",{{city:'{0}', ids:null}}", shippingListItem.Ext.Pickpointmap);
                else
                    temp = string.Empty;
                radioButton.Text +=
                    string.Format(
                        "<br/><div id=\"address\">{0}</div><a href=\"#\" onclick=\"PickPoint.open(SetPickPointAnswerAdmin{1});return false\">" +
                        "{2}</a><input type=\"hidden\" name=\"pickpoint_id\" id=\"pickpoint_id\" value=\"\" /><br />",
                        pickAddress.Value, temp, Resources.Resource.Client_OrderConfirmation_Select);
            }
            using (var img = new Image { ImageUrl = SettingsGeneral.AbsoluteUrl + "/" + ShippingIcons.GetShippingIcon(shippingListItem.Type, shippingListItem.IconName, shippingListItem.MethodNameRate) })
            {
                td.Controls.Add(img);
            }

            td.Controls.Add(radioButton);
            tr.Controls.Add(td);

            return tr;
        }
Пример #44
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Loop to display door types as radio buttons

            //For loop to get through all the possible door types: Cabana, French, Patio, Opening Only (No Door)
            for (int typeCount = 0; typeCount < 4; typeCount++)
            {
                //Conditional operator to set the current door type with the right label
                string title = Constants.DOOR_TYPES[typeCount]; //(typeCount == 1) ? "Cabana" : (typeCount == 2) ? "French" : (typeCount == 3) ? "Patio" : "NoDoor";

                if (title == "NoDoor")
                {
                    continue;
                }
                else
                {
                    //li tag to hold door type radio button and all its content
                    DoorOptions.Controls.Add(new LiteralControl("<li>"));
                }

                //Door type radio button
                RadioButton typeRadio = new RadioButton();
                typeRadio.ID = "radType" + title; //Adding appropriate id to door type radio button
                typeRadio.GroupName = "doorTypeRadios";         //Adding group name for all door types
                typeRadio.Attributes.Add("onclick", "typeRowsDisplayed('" + title + "')"); //On click event to display the proper fields/rows
                if (title == "Cabana")
                    typeRadio.Checked = true;

                //Door type radio button label for clickable area
                Label typeLabelRadio = new Label();
                typeLabelRadio.AssociatedControlID = "radType" + title;   //Tying this label to the radio button

                //Door type radio button label text
                Label typeLabel = new Label();
                typeLabel.AssociatedControlID = "radType" + title;    //Tying this label to the radio button
                typeLabel.Text = title;     //Displaying the proper texted based on current title variable

                DoorOptions.Controls.Add(typeRadio);        //Adding radio button control to placeholder DoorOptions
                DoorOptions.Controls.Add(typeLabelRadio);   //Adding label control to placeholder DoorOptions
                DoorOptions.Controls.Add(typeLabel);        //Adding label control to placeholder DoorOptions

                //New instance of a table for every door type
                Table tblDoorDetails = new Table();

                tblDoorDetails.ID = "tblDoorDetails" + title; //Adding appropriate id to the table
                tblDoorDetails.CssClass = "tblTextFields";                  //Adding CssClass to the table for styling

                //Creating cells and controls for rows

                #region Table:Default Row Title Current Door (tblDoorDetails)

                TableRow doorTitleRow = new TableRow();
                doorTitleRow.ID = "rowDoorTitle" + title;
                doorTitleRow.Attributes.Add("style", "display:none;");
                TableCell doorTitleLBLCell = new TableCell();

                Label doorTitleLBL = new Label();
                doorTitleLBL.ID = "lblDoorTitle" + title;
                doorTitleLBL.Text = "Select door details:";
                doorTitleLBL.Attributes.Add("style", "font-weight:bold;");

                #endregion

                #region Table:Second Row Door Style (tblDoorDetails)

                TableRow doorStyleRow = new TableRow();
                doorStyleRow.ID = "rowDoorStyle" + title;
                doorStyleRow.Attributes.Add("style", "display:none;");
                TableCell doorStyleLBLCell = new TableCell();
                TableCell doorStyleDDLCell = new TableCell();

                Label doorStyleLBL = new Label();
                doorStyleLBL.ID = "lblDoorStyle" + title;
                doorStyleLBL.Text = "Style";

                DropDownList doorStyleDDL = new DropDownList();
                doorStyleDDL.ID = "ddlDoorStyle" + title;
                doorStyleDDL.Attributes.Add("onchange", "doorStyle('" + title + "')");
                if (title == "Patio")
                {
                    for (int j = 0; j < Constants.DOOR_ORDER_PATIO.Count(); j++)
                    {
                        doorStyleDDL.Items.Add(new ListItem(Constants.DOOR_ORDER_PATIO[j], Constants.DOOR_ORDER_PATIO[j]));
                    }
                }
                else
                {
                    for (int j = 0; j < Constants.DOOR_ORDER_ENTRY.Count(); j++)
                    {
                        doorStyleDDL.Items.Add(new ListItem(Constants.DOOR_ORDER_ENTRY[j], Constants.DOOR_ORDER_ENTRY[j]));
                    }
                }

                doorStyleLBL.AssociatedControlID = "ddlDoorStyle" + title;

                #endregion

                #region Table:Sixteenth Row Door V4T Vinyl Tint (tblDoorDetails)

                TableRow doorVinylTintRow = new TableRow();
                doorVinylTintRow.ID = "rowDoorVinylTint" + title;
                doorVinylTintRow.Attributes.Add("style", "display:none;");
                TableCell doorVinylTintLBLCell = new TableCell();
                TableCell doorVinylTintDDLCell = new TableCell();

                Label doorVinylTintLBL = new Label();
                doorVinylTintLBL.ID = "lblDoorVinylTint" + title;
                doorVinylTintLBL.Text = "V4T Vinyl Tint:";

                DropDownList doorVinylTintDDL = new DropDownList();
                doorVinylTintDDL.ID = "ddlDoorVinylTint" + title;
                doorVinylTintDDL.Attributes.Add("onchange", "displayMixedTint('" + title + "')");
                for (int j = 0; j < Constants.DOOR_V4T_VINYL_OPTIONS.Count(); j++)
                {
                    doorVinylTintDDL.Items.Add(new ListItem(Constants.DOOR_V4T_VINYL_OPTIONS[j], Constants.DOOR_V4T_VINYL_OPTIONS[j]));
                }
                doorVinylTintLBL.AssociatedControlID = "ddlDoorVinylTint" + title;

                #endregion

                #region Door Height

                TableRow doorHeightRow = new TableRow();
                doorHeightRow.ID = "rowDoorHeight" + title;
                //doorHeightRow.Attributes.Add("style", "display:none;");
                TableCell doorHeightLBLCell = new TableCell();
                TableCell doorHeightTXTCell = new TableCell();
                TableCell doorHeightDDLCell = new TableCell();

                Label doorHeightLBL = new Label();
                doorHeightLBL.ID = "lblDoorHeight" + title;
                doorHeightLBL.Text = "Height:";

                TextBox doorHeightTXT = new TextBox();
                doorHeightTXT.ID = "txtDoorHeight" + title;
                doorHeightTXT.CssClass = "txtField txtDoorInput";
                doorHeightTXT.Attributes.Add("maxlength", "3");
                doorHeightTXT.Attributes.Add("onkeydown", "return (event.keyCode!=13);");
                doorHeightTXT.Attributes.Add("onblur", "recalculate('" + title + "');");

                DropDownList inchHeight = new DropDownList();
                inchHeight.ID = "ddlDoorHeight" + title;
                inchHeight.Attributes.Add("onchange", "recalculate('" + title + "');");
                inchHeight.Items.Add(lst0);
                inchHeight.Items.Add(lst18);
                inchHeight.Items.Add(lst14);
                inchHeight.Items.Add(lst38);
                inchHeight.Items.Add(lst12);
                inchHeight.Items.Add(lst58);
                inchHeight.Items.Add(lst34);
                inchHeight.Items.Add(lst78);

                doorHeightLBL.AssociatedControlID = "txtDoorHeight" + title;

                #endregion

                #region "As-if" Height

                TableRow doorAsIfHeightRow = new TableRow();
                doorAsIfHeightRow.ID = "rowDoorAsIfHeight" + title;
                doorAsIfHeightRow.Attributes.Add("style", "display:none;");
                TableCell doorAsIfHeightLBLCell = new TableCell();
                TableCell doorAsIfHeightTXTCell = new TableCell();
                TableCell doorAsIfHeightDDLCell = new TableCell();

                Label doorAsIfHeightLBL = new Label();
                doorAsIfHeightLBL.ID = "lblDoorAsIfHeight" + title;
                doorAsIfHeightLBL.Text = "Build As If:";

                TextBox doorAsIfHeightTXT = new TextBox();
                doorAsIfHeightTXT.ID = "txtDoorAsIfHeight" + title;
                doorAsIfHeightTXT.CssClass = "txtField txtDoorInput";
                doorAsIfHeightTXT.Attributes.Add("maxlength", "3");
                doorAsIfHeightTXT.Attributes.Add("onkeydown", "return (event.keyCode!=13);");
                doorAsIfHeightTXT.Attributes.Add("onblur", "recalculate('" + title + "');");

                DropDownList inchAsIfHeight = new DropDownList();
                inchAsIfHeight.ID = "ddlDoorAsIfHeight" + title;
                inchAsIfHeight.Attributes.Add("onchange", "recalculate('" + title + "');");
                inchAsIfHeight.Items.Add(lst0);
                inchAsIfHeight.Items.Add(lst18);
                inchAsIfHeight.Items.Add(lst14);
                inchAsIfHeight.Items.Add(lst38);
                inchAsIfHeight.Items.Add(lst12);
                inchAsIfHeight.Items.Add(lst58);
                inchAsIfHeight.Items.Add(lst34);
                inchAsIfHeight.Items.Add(lst78);

                doorAsIfHeightLBL.AssociatedControlID = "txtDoorAsIfHeight" + title;

                #endregion

                #region Door Width

                TableRow doorWidthRow = new TableRow();
                doorWidthRow.ID = "rowDoorWidth" + title;
                //doorWidthRow.Attributes.Add("style", "display:none;");
                TableCell doorWidthLBLCell = new TableCell();
                TableCell doorWidthTXTCell = new TableCell();
                TableCell doorWidthDDLCell = new TableCell();

                Label doorWidthLBL = new Label();
                doorWidthLBL.ID = "lblDoorWidth" + title;
                doorWidthLBL.Text = "Width:";

                TextBox doorWidthTXT = new TextBox();
                doorWidthTXT.ID = "txtDoorWidth" + title;
                doorWidthTXT.CssClass = "txtField txtDoorInput";
                doorWidthTXT.Attributes.Add("maxlength", "3");
                doorWidthTXT.Attributes.Add("onkeydown", "return (event.keyCode!=13);");
                doorWidthTXT.Attributes.Add("onblur", "recalculate('" + title + "');");

                DropDownList inchWidth = new DropDownList();
                inchWidth.ID = "ddlDoorWidth" + title;
                inchWidth.Attributes.Add("onchange", "recalculate('" + title + "');");
                inchWidth.Items.Add(lst0);
                inchWidth.Items.Add(lst18);
                inchWidth.Items.Add(lst14);
                inchWidth.Items.Add(lst38);
                inchWidth.Items.Add(lst12);
                inchWidth.Items.Add(lst58);
                inchWidth.Items.Add(lst34);
                inchWidth.Items.Add(lst78);

                doorWidthLBL.AssociatedControlID = "txtDoorWidth" + title;

                #endregion

                #region V4T Number Of Vents

                TableRow doorV4TNumberOfVentsRow = new TableRow();
                doorV4TNumberOfVentsRow.ID = "rowDoorV4TNumberOfVents" + title;
                doorV4TNumberOfVentsRow.Attributes.Add("style", "display:inherit");
                //doorV4TNumberOfVentsRow.Attributes.Add("style", "display:none;");
                TableCell doorV4TNumberOfVentsLBLCell = new TableCell();
                TableCell doorV4TNumberOfVentsDDLCell = new TableCell();

                Label doorV4TNumberOfVentsLBL = new Label();
                doorV4TNumberOfVentsLBL.ID = "lblV4TNumberOfVents" + title;
                doorV4TNumberOfVentsLBL.Text = "Number Of Vents:";

                DropDownList doorV4TNumberOfVentsDDL = new DropDownList();
                doorV4TNumberOfVentsDDL.ID = "ddlDoorV4TNumberOfVents" + title;
                doorV4TNumberOfVentsDDL.Attributes.Add("onchange", "tintOptionsChanged('" + title + "'); displayMixedTint('" + title + "');");
                for (int j = 0; j < Constants.DOOR_NUMBER_OF_VENTS.Count(); j++)
                {
                    doorV4TNumberOfVentsDDL.Items.Add(new ListItem(Constants.DOOR_NUMBER_OF_VENTS[j], Constants.DOOR_NUMBER_OF_VENTS[j]));
                }

                doorV4TNumberOfVentsLBL.AssociatedControlID = "ddlDoorV4TNumberOfVents" + title;

                #region Uneven Vents Checkbox

                TableCell doorUnevenVentsCHKCell = new TableCell();
                //doorUnevenVentsCHKCell.Attributes.Add("style", "display:none;");
                doorUnevenVentsCHKCell.ID = "cellDoorUnevenVents" + title;

                Label doorUnevenVentsLBLChk = new Label();
                doorUnevenVentsLBLChk.ID = "lblDoorUnevenVents" + title;

                Label doorUnevenVentsLBL = new Label();
                doorUnevenVentsLBL.ID = "lblDoorUnevenVentsRad" + title;
                doorUnevenVentsLBL.Text = " Uneven Vents";

                CheckBox doorUnevenVentsCHK = new CheckBox();
                doorUnevenVentsCHK.ID = "chkDoorUnevenVents" + title;
                doorUnevenVentsCHK.Attributes.Add("value", "UnevenVents");
                doorUnevenVentsCHK.Attributes.Add("onclick", "unevenVentsChecked(this.checked,'" + title + "');");

                doorUnevenVentsLBLChk.AssociatedControlID = "chkDoorUnevenVents" + title;
                doorUnevenVentsLBL.AssociatedControlID = "chkDoorUnevenVents" + title;

                #endregion

                #endregion

                #region Uneven Vents Top Bottom Both Rads

                TableRow doorTopBottomBothRadRow = new TableRow();
                doorTopBottomBothRadRow.ID = "rowDoorTopBottomBothRad" + title;
                doorTopBottomBothRadRow.Attributes.Add("style", "display:none;");

                #region Top

                TableCell doorTopRadCell = new TableCell();

                Label doorTopRadLBLRad = new Label();
                doorTopRadLBLRad.ID = "lblDoorTopRad" + title;

                Label doorTopRadLBL = new Label();
                doorTopRadLBL.ID = "lblDoorTopRadRad" + title;
                doorTopRadLBL.Text = "Top";

                RadioButton doorTopRadRAD = new RadioButton();
                doorTopRadRAD.ID = "radDoorTopRad" + title;
                doorTopRadRAD.Attributes.Add("value", "top");
                doorTopRadRAD.GroupName = "Uneven" + title;
                doorTopRadRAD.Attributes.Add("onclick", "topOrBottomUnevenClicked('" + title + "');");

                doorTopRadLBLRad.AssociatedControlID = "radDoorTopRad" + title;
                doorTopRadLBL.AssociatedControlID = "radDoorTopRad" + title;

                doorTopRadCell.Controls.Add(doorTopRadRAD);
                doorTopRadCell.Controls.Add(doorTopRadLBLRad);
                doorTopRadCell.Controls.Add(doorTopRadLBL);

                #endregion

                #region Bottom

                TableCell doorBottomRadCell = new TableCell();

                Label doorBottomRadLBLRad = new Label();
                doorBottomRadLBLRad.ID = "lblDoorBottomRad" + title;

                Label doorBottomRadLBL = new Label();
                doorBottomRadLBL.ID = "lblDoorBottomRadRad" + title;
                doorBottomRadLBL.Text = "Bottom";

                RadioButton doorBottomRadRAD = new RadioButton();
                doorBottomRadRAD.ID = "radDoorBottomRad" + title;
                doorBottomRadRAD.Attributes.Add("value", "bottom");
                doorBottomRadRAD.GroupName = "Uneven" + title;
                doorBottomRadRAD.Attributes.Add("onclick", "('" + title + "');");
                doorBottomRadRAD.Checked = true;

                doorBottomRadLBLRad.AssociatedControlID = "radDoorBottomRad" + title;
                doorBottomRadLBL.AssociatedControlID = "radDoorBottomRad" + title;

                doorBottomRadCell.Controls.Add(doorBottomRadRAD);
                doorBottomRadCell.Controls.Add(doorBottomRadLBLRad);
                doorBottomRadCell.Controls.Add(doorBottomRadLBL);

                #endregion

                #region Both

                TableCell doorBothRadCell = new TableCell();

                Label doorBothRadLBLRad = new Label();
                doorBothRadLBLRad.ID = "lblDoorBothRad" + title;

                Label doorBothRadLBL = new Label();
                doorBothRadLBL.ID = "lblDoorBothRadRad" + title;
                doorBothRadLBL.Text = "Both";

                RadioButton doorBothRadRAD = new RadioButton();
                doorBothRadRAD.ID = "radDoorBothRad" + title;
                doorBothRadRAD.Attributes.Add("value", "both");
                doorBothRadRAD.GroupName = "Uneven" + title;
                doorBothRadRAD.Attributes.Add("onclick", "bothUnevenClicked('" + title + "')");

                doorBothRadLBLRad.AssociatedControlID = "radDoorBothRad" + title;
                doorBothRadLBL.AssociatedControlID = "radDoorBothRad" + title;

                doorBothRadCell.Controls.Add(doorBothRadRAD);
                doorBothRadCell.Controls.Add(doorBothRadLBLRad);
                doorBothRadCell.Controls.Add(doorBothRadLBL);

                #endregion

                #endregion

                #region Uneven Vents Textboxes

                #region Top

                TableRow doorUnevenVentsRowTop = new TableRow();
                doorUnevenVentsRowTop.ID = "rowDoorUnevenVentsTop" + title;
                doorUnevenVentsRowTop.Attributes.Add("style", "display:none;");

                TableCell doorTopVentLBLCell = new TableCell();
                TableCell doorTopVentTXTCell = new TableCell();
                //TableCell doorTopVentDDLCell = new TableCell();

                Label doorTopVentLBL = new Label();
                doorTopVentLBL.ID = "lblDoorTopVentHeight" + title;
                doorTopVentLBL.Text = "Top Vent Height:";

                TextBox doorTopVentTXT = new TextBox();
                doorTopVentTXT.ID = "txtDoorTopVentHeight" + title;
                doorTopVentTXT.CssClass = "txtField txtDoorInput";
                doorTopVentTXT.Attributes.Add("maxlength", "3");
                doorTopVentTXT.Attributes.Add("onkeydown", "return (event.keyCode!=13);");
                doorTopVentTXT.Attributes.Add("onblur", "adjustVentHeights(this.value, 'top');");

                doorTopVentLBL.AssociatedControlID = "txtDoorTopVentHeight" + title;

                doorTopVentLBLCell.Controls.Add(doorTopVentLBL);
                doorTopVentTXTCell.Controls.Add(doorTopVentTXT);

                #endregion

                #region Bottom

                TableRow doorUnevenVentsRowBottom = new TableRow();
                doorUnevenVentsRowBottom.ID = "rowDoorUnevenVentsBottom" + title;
                doorUnevenVentsRowBottom.Attributes.Add("style", "display:none;");

                TableCell doorBottomVentLBLCell = new TableCell();
                TableCell doorBottomVentTXTCell = new TableCell();
                //TableCell doorBottomVentDDLCell = new TableCell();

                Label doorBottomVentLBL = new Label();
                doorBottomVentLBL.ID = "lblDoorBottomVentHeight" + title;
                doorBottomVentLBL.Text = "Bottom Vent Height:";

                TextBox doorBottomVentTXT = new TextBox();
                doorBottomVentTXT.ID = "txtDoorBottomVentHeight" + title;
                doorBottomVentTXT.CssClass = "txtField txtDoorInput";
                doorBottomVentTXT.Attributes.Add("maxlength", "3");
                doorBottomVentTXT.Attributes.Add("onkeydown", "return (event.keyCode!=13);");
                doorBottomVentTXT.Attributes.Add("onblur", "adjustVentHeights(this.value, 'bottom');");

                //DropDownList inchBottomVentDDL = new DropDownList();
                //inchBottomVentDDL.ID = "ddlDoorBottomVentHeight" + title;
                //inchBottomVentDDL.Items.Add(lst0);
                //inchBottomVentDDL.Items.Add(lst116);
                //inchBottomVentDDL.Items.Add(lst216);
                //inchBottomVentDDL.Items.Add(lst316);
                //inchBottomVentDDL.Items.Add(lst416);
                //inchBottomVentDDL.Items.Add(lst516);
                //inchBottomVentDDL.Items.Add(lst616);
                //inchBottomVentDDL.Items.Add(lst716);
                //inchBottomVentDDL.Items.Add(lst816);
                //inchBottomVentDDL.Items.Add(lst916);
                //inchBottomVentDDL.Items.Add(lst1016);
                //inchBottomVentDDL.Items.Add(lst1116);
                //inchBottomVentDDL.Items.Add(lst1216);
                //inchBottomVentDDL.Items.Add(lst1316);
                //inchBottomVentDDL.Items.Add(lst1416);
                //inchBottomVentDDL.Items.Add(lst1516);

                doorBottomVentLBL.AssociatedControlID = "txtDoorBottomVentHeight" + title;

                doorBottomVentLBLCell.Controls.Add(doorBottomVentLBL);
                doorBottomVentTXTCell.Controls.Add(doorBottomVentTXT);
                //doorBottomVentDDLCell.Controls.Add(inchBottomVentDDL);

                #endregion

                #endregion

                #region Commented V4T
                /*

                #region Table:Twelfth Row Door V4T Number Of Vents (tblDoorDetails)

                TableRow doorNumberOfVentsRow = new TableRow();
                doorNumberOfVentsRow.ID = "rowDoorNumberOfVents" + title;
                doorNumberOfVentsRow.Attributes.Add("style", "display:none;");
                TableCell doorNumberOfVentsLBLCell = new TableCell();
                TableCell doorNumberOfVentsDDLCell = new TableCell();

                Label doorNumberOfVentsLBL = new Label();
                doorNumberOfVentsLBL.ID = "lblNumberOfVents" + title;
                doorNumberOfVentsLBL.Text = "V4T Number Of Vents:";

                DropDownList doorNumberOfVentsDDL = new DropDownList();
                doorNumberOfVentsDDL.ID = "ddlDoorNumberOfVents" + title;
                doorNumberOfVentsDDL.Attributes.Add("onchange", "displayMixedTint('" + title + "')");
                for (int j = 0; j < Constants.DOOR_NUMBER_OF_VENTS.Count(); j++)
                {
                    doorNumberOfVentsDDL.Items.Add(new ListItem(Constants.DOOR_NUMBER_OF_VENTS[j], Constants.DOOR_NUMBER_OF_VENTS[j]));
                }

                doorNumberOfVentsLBL.AssociatedControlID = "ddlDoorNumberOfVents" + title;

                #endregion
                */
                #endregion

                #region Table:# Row Door Transom Vinyl (tblDoorDetails)

                TableRow doorTransomVinylRow = new TableRow();
                doorTransomVinylRow.ID = "rowDoorTransomVinyl" + title;
                doorTransomVinylRow.Attributes.Add("style", "display:none;");
                TableCell doorTransomVinylTypesLBLCell = new TableCell();
                TableCell doorTransomVinylTypesDDLCell = new TableCell();

                Label doorTransomVinylLBL = new Label();
                doorTransomVinylLBL.ID = "lblDoorTransomVinyl" + title;
                doorTransomVinylLBL.Text = "Transom Vinyl Types:";

                DropDownList doorTransomVinylDDL = new DropDownList();
                doorTransomVinylDDL.ID = "ddlDoorTransomVinyl" + title;
                for (int j = 0; j < Constants.VINYL_TINTS.Count(); j++)
                {
                    doorTransomVinylDDL.Items.Add(new ListItem(Constants.VINYL_TINTS[j], Constants.VINYL_TINTS[j]));
                }

                doorTransomVinylLBL.AssociatedControlID = "ddlDoorTransomVinyl" + title;

                #endregion

                #region Table:# Row Door Transom Glass Types (tblDoorDetails)

                TableRow doorTransomGlassRow = new TableRow();
                doorTransomGlassRow.ID = "rowDoorTransomGlass" + title;
                doorTransomGlassRow.Attributes.Add("style", "display:none;");
                TableCell doorTransomGlassTypesLBLCell = new TableCell();
                TableCell doorTransomGlassTypesDDLCell = new TableCell();

                Label doorTransomGlassLBL = new Label();
                doorTransomGlassLBL.ID = "lblDoorTransomGlass" + title;
                doorTransomGlassLBL.Text = "Transom Glass Types:";

                DropDownList doorTransomGlassDDL = new DropDownList();
                doorTransomGlassDDL.ID = "ddlDoorTransomGlass" + title;
                for (int j = 0; j < Constants.TRANSOM_GLASS_TINTS.Count(); j++)
                {
                    doorTransomGlassDDL.Items.Add(new ListItem(Constants.TRANSOM_GLASS_TINTS[j], Constants.TRANSOM_GLASS_TINTS[j]));
                }

                doorTransomGlassLBL.AssociatedControlID = "ddlDoorTransomGlass" + title;

                #endregion

                #region Table:# Row Door Kickplate (tblDoorDetails)

                TableRow doorKickplateRow = new TableRow();
                doorKickplateRow.ID = "rowDoorKickplate" + title;
                doorKickplateRow.Attributes.Add("style", "display:none;");
                TableCell doorKickplateLBLCell = new TableCell();
                TableCell doorKickplateDDLCell = new TableCell();

                Label doorKickplateLBL = new Label();
                doorKickplateLBL.ID = "lblDoorKickplate" + title;
                doorKickplateLBL.Text = "Kickplate Height:";

                DropDownList doorKickplateDDL = new DropDownList();
                doorKickplateDDL.ID = "ddlDoorKickplate" + title;
                doorKickplateDDL.Attributes.Add("onchange", "doorKickplateStyle('" + title + "','" + "')");
                for (int j = 0; j < Constants.KICKPLATE_SIZE_OPTIONS.Count(); j++)
                {
                    if (Constants.KICKPLATE_SIZE_OPTIONS[j] == "Custom")
                    {
                        doorKickplateDDL.Items.Add(new ListItem(Constants.KICKPLATE_SIZE_OPTIONS[j], "cKickplate"));
                    }
                    else
                    {
                        doorKickplateDDL.Items.Add(new ListItem(Constants.KICKPLATE_SIZE_OPTIONS[j] + "\"", Constants.KICKPLATE_SIZE_OPTIONS[j]));
                    }
                }

                #endregion

                #region Table:# Row Door Kickplate Custom (tblDoorDetails)

                TableRow doorCustomKickplateRow = new TableRow();
                doorCustomKickplateRow.ID = "rowDoorCustomKickplate" + title;
                doorCustomKickplateRow.Attributes.Add("style", "display:none;");
                TableCell doorCustomKickplateLBLCell = new TableCell();
                TableCell doorCustomKickplateTXTCell = new TableCell();
                TableCell doorCustomKickplateDDLCell = new TableCell();

                Label doorCustomKickplateLBL = new Label();
                doorCustomKickplateLBL.ID = "lblDoorCustomKickplate" + title;
                doorCustomKickplateLBL.Text = "Custom Kickplate (inches):";

                TextBox doorCustomKickplateTXT = new TextBox();
                doorCustomKickplateTXT.ID = "txtDoorKickplateCustom" + title;
                doorCustomKickplateTXT.CssClass = "txtField txtDoorInput";
                doorCustomKickplateTXT.Attributes.Add("maxlength", "3");
                doorCustomKickplateTXT.Attributes.Add("onkeydown", "return (event.keyCode!=13);");

                DropDownList inchCustomKickplate = new DropDownList();
                inchCustomKickplate.ID = "ddlDoorKickplateCustom" + title;
                inchCustomKickplate.Items.Add(lst0);
                inchCustomKickplate.Items.Add(lst18);
                inchCustomKickplate.Items.Add(lst14);
                inchCustomKickplate.Items.Add(lst38);
                inchCustomKickplate.Items.Add(lst12);
                inchCustomKickplate.Items.Add(lst58);
                inchCustomKickplate.Items.Add(lst34);
                inchCustomKickplate.Items.Add(lst78);

                doorCustomKickplateLBL.AssociatedControlID = "txtDoorKickplateCustom" + title;

                #endregion

                #region Table:Third Row Color of Door (tblDoorDetails)

                TableRow colourOfDoorRow = new TableRow();
                colourOfDoorRow.ID = "rowDoorColour" + title;
                colourOfDoorRow.Attributes.Add("style", "display:none;");
                TableCell colourOfDoorLBLCell = new TableCell();
                TableCell colourOfDoorDDLCell = new TableCell();

                Label colourOfDoorLBL = new Label();
                colourOfDoorLBL.ID = "lblDoorColour" + title;
                colourOfDoorLBL.Text = "Colour:";

                DropDownList colourOfDoorDDL = new DropDownList();
                colourOfDoorDDL.ID = "ddlDoorColour" + title;
                for (int j = 0; j < Constants.DOOR_COLOURS.Count(); j++)
                {
                    colourOfDoorDDL.Items.Add(new ListItem(Constants.DOOR_COLOURS[j], Constants.DOOR_COLOURS[j]));
                }

                colourOfDoorLBL.AssociatedControlID = "ddlDoorColour" + title;

                #endregion

                #region Commented Height/Width
                /*
                #region Table:Fourth Row Door Height (tblDoorDetails)

                TableRow doorHeightRow = new TableRow();
                doorHeightRow.ID = "rowDoorHeight" + title;
                doorHeightRow.Attributes.Add("style", "display:none;");
                TableCell doorHeightLBLCell = new TableCell();
                TableCell doorHeightDDLCell = new TableCell();

                Label doorHeightLBL = new Label();
                doorHeightLBL.ID = "lblDoorHeight" + title;
                doorHeightLBL.Text = "Height:";

                DropDownList doorHeightDDL = new DropDownList();
                doorHeightDDL.ID = "ddlDoorHeight" + title;
                doorHeightDDL.Attributes.Add("onchange", "customDimension('" + title + "','Height')");
                for (int j = 0; j < Constants.DOOR_HEIGHTS.Count(); j++)
                {
                    if (Constants.DOOR_HEIGHTS[j] == "Custom")
                    {
                        doorHeightDDL.Items.Add(new ListItem(Constants.DOOR_HEIGHTS[j], "cHeight"));
                    }
                    else
                    {
                        doorHeightDDL.Items.Add(new ListItem(Constants.DOOR_HEIGHTS[j] + "\"", Constants.DOOR_HEIGHTS[j]));
                    }
                }

                doorHeightLBL.AssociatedControlID = "ddlDoorHeight" + title;

                #endregion

                #region Table:Sixth Row Door Custom Height (tblDoorDetails)

                TableRow doorCustomHeightRow = new TableRow();
                doorCustomHeightRow.ID = "rowDoorCustomHeight" + title;
                doorCustomHeightRow.Attributes.Add("style", "display:none;");
                TableCell doorCustomHeightLBLCell = new TableCell();
                TableCell doorCustomHeightTXTCell = new TableCell();
                TableCell doorCustomHeightDDLCell = new TableCell();

                Label doorCustomHeightLBL = new Label();
                doorCustomHeightLBL.ID = "lblDoorCustomHeight" + title;
                doorCustomHeightLBL.Text = "Custom Height (inches):";

                TextBox doorCustomHeightTXT = new TextBox();
                doorCustomHeightTXT.ID = "txtDoorHeightCustom" + title;
                doorCustomHeightTXT.CssClass = "txtField txtDoorInput";
                doorCustomHeightTXT.Attributes.Add("maxlength", "3");
                doorCustomHeightTXT.Attributes.Add("onkeydown", "return (event.keyCode!=13);");

                DropDownList inchCustomHeight = new DropDownList();
                inchCustomHeight.ID = "ddlDoorHeightCustom" + title;
                inchCustomHeight.Items.Add(lst0);
                inchCustomHeight.Items.Add(lst18);
                inchCustomHeight.Items.Add(lst14);
                inchCustomHeight.Items.Add(lst38);
                inchCustomHeight.Items.Add(lst12);
                inchCustomHeight.Items.Add(lst58);
                inchCustomHeight.Items.Add(lst34);
                inchCustomHeight.Items.Add(lst78);

                doorCustomHeightLBL.AssociatedControlID = "txtDoorHeightCustom" + title;

                #endregion

                #region Table:Fifth Row Door Width (tblDoorDetails)

                TableRow doorWidthRow = new TableRow();
                doorWidthRow.ID = "rowDoorWidth" + title;
                doorWidthRow.Attributes.Add("style", "display:none;");
                TableCell doorWidthLBLCell = new TableCell();
                TableCell doorWidthDDLCell = new TableCell();

                Label doorWidthLBL = new Label();
                doorWidthLBL.ID = "lblDoorWidth" + title;
                doorWidthLBL.Text = "Width:";

                DropDownList doorWidthDDL = new DropDownList();
                doorWidthDDL.ID = "ddlDoorWidth" + title;
                doorWidthDDL.Attributes.Add("onchange", "customDimension('" + title + "','Width')");

                if (title == "Patio")
                {
                    for (int j = 0; j < Constants.DOOR_WIDTHS_PATIO.Count(); j++)
                    {
                        if (Constants.DOOR_WIDTHS_PATIO[j] == "Custom")
                        {
                            doorWidthDDL.Items.Add(new ListItem(Constants.DOOR_WIDTHS_PATIO[j], "cWidth"));
                        }
                        else
                        {
                            doorWidthDDL.Items.Add(new ListItem(Constants.DOOR_WIDTHS_PATIO[j] + "\'", Convert.ToString((Convert.ToInt32(Constants.DOOR_WIDTHS_PATIO[j]) * 12))));
                        }
                    }
                }
                else if (title == "French")
                {
                    for (int j = 0; j < Constants.DOOR_WIDTHS_FRENCH.Count(); j++)
                    {
                        if (Constants.DOOR_WIDTHS_FRENCH[j] == "Custom")
                        {
                            doorWidthDDL.Items.Add(new ListItem(Constants.DOOR_WIDTHS_FRENCH[j], "cWidth"));
                        }
                        else
                        {
                            doorWidthDDL.Items.Add(new ListItem(Constants.DOOR_WIDTHS_FRENCH[j] + "\"", Constants.DOOR_WIDTHS_FRENCH[j]));
                        }
                    }
                }
                else
                {
                    for (int j = 0; j < Constants.DOOR_WIDTHS_CABANA_NODOOR.Count(); j++)
                    {
                        if (Constants.DOOR_WIDTHS_CABANA_NODOOR[j] == "Custom")
                        {
                            doorWidthDDL.Items.Add(new ListItem(Constants.DOOR_WIDTHS_CABANA_NODOOR[j], "cWidth"));
                        }
                        else
                        {
                            doorWidthDDL.Items.Add(new ListItem(Constants.DOOR_WIDTHS_CABANA_NODOOR[j] + "\"", Constants.DOOR_WIDTHS_CABANA_NODOOR[j]));
                        }
                    }
                }

                doorWidthLBL.AssociatedControlID = "ddlDoorWidth" + title;

                #endregion

                #region Table:Seventh Row Door Custom Width (tblDoorDetails)

                TableRow doorCustomWidthRow = new TableRow();
                doorCustomWidthRow.ID = "rowDoorCustomWidth" + title;
                doorCustomWidthRow.Attributes.Add("style", "display:none;");
                TableCell doorCustomWidthLBLCell = new TableCell();
                TableCell doorCustomWidthTXTCell = new TableCell();
                TableCell doorCustomWidthDDLCell = new TableCell();

                Label doorCustomWidthLBL = new Label();
                doorCustomWidthLBL.ID = "lblDoorCustomWidth" + title;
                doorCustomWidthLBL.Text = "Custom Width (inches):";

                TextBox doorCustomWidthTXT = new TextBox();
                doorCustomWidthTXT.ID = "txtDoorWidthCustom" + title;
                doorCustomWidthTXT.CssClass = "txtField txtDoorInput";
                doorCustomWidthTXT.Attributes.Add("maxlength", "3");
                doorCustomWidthTXT.Attributes.Add("onkeydown", "return (event.keyCode!=13);");

                DropDownList inchCustomWidth = new DropDownList();
                inchCustomWidth.ID = "ddlDoorWidthCustom" + title;
                inchCustomWidth.Items.Add(lst0);
                inchCustomWidth.Items.Add(lst18);
                inchCustomWidth.Items.Add(lst14);
                inchCustomWidth.Items.Add(lst38);
                inchCustomWidth.Items.Add(lst12);
                inchCustomWidth.Items.Add(lst58);
                inchCustomWidth.Items.Add(lst34);
                inchCustomWidth.Items.Add(lst78);

                doorCustomWidthLBL.AssociatedControlID = "txtDoorWidthCustom" + title;

                #endregion
                */
                #endregion

                #region Table:Eight Row Door Primary Operator LHH (tblDoorDetails)

                TableRow doorOperatorLHHRow = new TableRow();
                doorOperatorLHHRow.ID = "rowDoorOperatorLHH" + title;
                doorOperatorLHHRow.Attributes.Add("style", "display:none;");
                TableCell doorOperatorLHHLBLCell = new TableCell();
                TableCell doorOperatorLHHRADCell = new TableCell();

                Label doorOperatorLHHLBLMain = new Label();
                doorOperatorLHHLBLMain.ID = "lblDoorOperatorLHHMain" + title;
                doorOperatorLHHLBLMain.Text = "Primary Operator:";

                Label doorOperatorLHHLBLRad = new Label();
                doorOperatorLHHLBLRad.ID = "lblDoorOperatorRadLHH" + title;

                Label doorOperatorLHHLBL = new Label();
                doorOperatorLHHLBL.ID = "lblDoorOperatorLHH" + title;
                doorOperatorLHHLBL.Text = "Left";

                RadioButton doorOperatorLHHRad = new RadioButton();
                doorOperatorLHHRad.ID = "radDoorOperator" + title;
                doorOperatorLHHRad.Attributes.Add("value", "Left");
                doorOperatorLHHRad.GroupName = "PrimaryOperator" + title;

                doorOperatorLHHLBLRad.AssociatedControlID = "radDoorOperator" + title;
                doorOperatorLHHLBL.AssociatedControlID = "radDoorOperator" + title;

                #endregion

                #region Table:Ninth Row Door Primary Operator RHH (tblDoorDetails)

                TableRow doorOperatorRHHRow = new TableRow();
                doorOperatorRHHRow.ID = "rowDoorOperatorRHH" + title;
                doorOperatorRHHRow.Attributes.Add("style", "display:none;");
                TableCell doorOperatorRHHLBLCell = new TableCell();
                TableCell doorOperatorRHHRADCell = new TableCell();

                Label doorOperatorRHHLBLRad = new Label();
                doorOperatorRHHLBLRad.ID = "lblDoorOperatorRadRHH" + title;

                Label doorOperatorRHHLBL = new Label();
                doorOperatorRHHLBL.ID = "lblDoorOperatorRHH" + title;
                doorOperatorRHHLBL.Text = "Right";

                RadioButton doorOperatorRHHRad = new RadioButton();
                doorOperatorRHHRad.ID = "radDoorOperatorRHH" + title;
                doorOperatorRHHRad.Attributes.Add("value", "Right");
                doorOperatorRHHRad.GroupName = "PrimaryOperator" + title;

                doorOperatorRHHLBLRad.AssociatedControlID = "radDoorOperatorRHH" + title;
                doorOperatorRHHLBL.AssociatedControlID = "radDoorOperatorRHH" + title;

                #endregion

                #region Table:Tenth Row Door Box Header (tblDoorDetails)

                TableRow doorBoxHeaderRow = new TableRow();
                doorBoxHeaderRow.ID = "rowDoorBoxHeader" + title;
                doorBoxHeaderRow.Attributes.Add("style", "display:none;");
                TableCell doorBoxHeaderLBLCell = new TableCell();
                TableCell doorBoxHeaderDDLCell = new TableCell();

                Label doorBoxHeaderLBL = new Label();
                doorBoxHeaderLBL.ID = "lblDoorBoxHeader" + title;
                doorBoxHeaderLBL.Text = "Box Header Position:";

                DropDownList doorBoxHeaderDDL = new DropDownList();
                doorBoxHeaderDDL.ID = "ddlDoorBoxHeader" + title;
                for (int j = 0; j < Constants.DOOR_BOXHEADER_POSITION.Count(); j++)
                {
                    doorBoxHeaderDDL.Items.Add(new ListItem(Constants.DOOR_BOXHEADER_POSITION[j], Constants.DOOR_BOXHEADER_POSITION[j]));
                }

                doorBoxHeaderLBL.AssociatedControlID = "ddlDoorBoxHeader" + title;

                #endregion

                #region Table:Thirteenth Row Door Glass Tint (tblDoorDetails)

                TableRow doorGlassTintRow = new TableRow();
                doorGlassTintRow.ID = "rowDoorGlassTint" + title;
                doorGlassTintRow.Attributes.Add("style", "display:none;");
                TableCell doorGlassTintLBLCell = new TableCell();
                TableCell doorGlassTintDDLCell = new TableCell();

                Label doorGlassTintLBL = new Label();
                doorGlassTintLBL.ID = "lblDoorGlassTint" + title;
                doorGlassTintLBL.Text = "Door Glass Tint:";

                DropDownList doorGlassTintDDL = new DropDownList();
                doorGlassTintDDL.ID = "ddlDoorGlassTint" + title;
                for (int j = 0; j < Constants.DOOR_GLASS_TINTS.Count(); j++)
                {
                    doorGlassTintDDL.Items.Add(new ListItem(Constants.DOOR_GLASS_TINTS[j], Constants.DOOR_GLASS_TINTS[j]));
                }

                doorGlassTintLBL.AssociatedControlID = "ddlDoorGlassTint" + title;

                #endregion

                #region Table:Tenth Row Door Hinge LHH (tblDoorDetails)

                TableRow doorHingeLHHRow = new TableRow();
                doorHingeLHHRow.ID = "rowDoorHingeLHH" + title;
                doorHingeLHHRow.Attributes.Add("style", "display:none;");
                TableCell doorHingeLHHLBLCell = new TableCell();
                TableCell doorHingeLHHRADCell = new TableCell();

                Label doorHingeLHHLBLMain = new Label();
                doorHingeLHHLBLMain.ID = "lblDoorHingeLHHMain" + title;
                doorHingeLHHLBLMain.Text = "Hinge Placement:";

                Label doorHingeLHHLBLRad = new Label();
                doorHingeLHHLBLRad.ID = "lblHingeLHHRad" + title;

                Label doorHingeLHHLBL = new Label();
                doorHingeLHHLBL.ID = "lblHingeLHH" + title;
                doorHingeLHHLBL.Text = "Left";

                RadioButton doorHingeLHHRad = new RadioButton();
                doorHingeLHHRad.ID = "radDoorHinge" + title;
                doorHingeLHHRad.Attributes.Add("value", "Left");
                doorHingeLHHRad.GroupName = "DoorHinge" + title;

                doorHingeLHHLBLRad.AssociatedControlID = "radDoorHinge" + title;
                doorHingeLHHLBL.AssociatedControlID = "radDoorHinge" + title;

                #endregion

                #region Table:Eleventh Row Door Hinge RHH (tblDoorDetails)

                TableRow doorHingeRHHRow = new TableRow();
                doorHingeRHHRow.ID = "rowDoorHingeRHH" + title;
                doorHingeRHHRow.Attributes.Add("style", "display:none;");
                TableCell doorHingeRHHLBLCell = new TableCell();
                TableCell doorHingeRHHRADCell = new TableCell();

                Label doorHingeRHHLBLRad = new Label();
                doorHingeRHHLBLRad.ID = "lblDoorHingeRHHRad" + title;

                Label doorHingeRHHLBL = new Label();
                doorHingeRHHLBL.ID = "lblDoorHingeRHH" + title;
                doorHingeRHHLBL.Text = "Right";

                RadioButton doorHingeRHHRad = new RadioButton();
                doorHingeRHHRad.ID = "radDoorHingeRHH" + title;
                doorHingeRHHRad.Attributes.Add("value", "Right");
                doorHingeRHHRad.GroupName = "DoorHinge" + title;

                doorHingeRHHLBLRad.AssociatedControlID = "radDoorHingeRHH" + title;
                doorHingeRHHLBL.AssociatedControlID = "radDoorHingeRHH" + title;

                #endregion

                #region Table:Fourteenth Row Door Screen Types (tblDoorDetails)

                TableRow doorScreenTypesRow = new TableRow();
                doorScreenTypesRow.ID = "rowDoorScreenTypes" + title;
                doorScreenTypesRow.Attributes.Add("style", "display:none;");
                TableCell doorScreenTypesLBLCell = new TableCell();
                TableCell doorScreenTypesDDLCell = new TableCell();

                Label doorScreenTypesLBL = new Label();
                doorScreenTypesLBL.ID = "lblDoorScreenTypes" + title;
                doorScreenTypesLBL.Text = "Door Screen Type:";

                DropDownList doorScreenTypesDDL = new DropDownList();
                doorScreenTypesDDL.ID = "ddlDoorScreenTypes" + title;
                for (int j = 0; j < Constants.SCREEN_TYPES.Count(); j++)
                {
                    doorScreenTypesDDL.Items.Add(new ListItem(Constants.SCREEN_TYPES[j], Constants.SCREEN_TYPES[j]));
                }

                doorScreenTypesLBL.AssociatedControlID = "ddlDoorScreenTypes" + title;

                #endregion

                #region Table:Fifteenth Row Door Hardware (tblDoorDetails)

                TableRow doorHardwareRow = new TableRow();
                doorHardwareRow.ID = "rowDoorHardware" + title;
                doorHardwareRow.Attributes.Add("style", "display:none;");
                TableCell doorHardwareLBLCell = new TableCell();
                TableCell doorHardwareDDLCell = new TableCell();

                Label doorHardwareLBL = new Label();
                doorHardwareLBL.ID = "lblDoorHardware" + title;
                doorHardwareLBL.Text = "Door Hardware";

                DropDownList doorHardwareDDL = new DropDownList();
                doorHardwareDDL.ID = "ddlDoorHardware" + title;
                for (int j = 0; j < Constants.DOOR_HARDWARE.Count(); j++)
                {
                    doorHardwareDDL.Items.Add(new ListItem(Constants.DOOR_HARDWARE[j], Constants.DOOR_HARDWARE[j]));
                }

                doorHardwareLBL.AssociatedControlID = "ddlDoorHardware" + title;

                #endregion

                #region Table:Eight Row Door Swing In (tblDoorDetails)

                TableRow doorSwingInRow = new TableRow();
                doorSwingInRow.ID = "rowDoorSwingIn" + title;
                doorSwingInRow.Attributes.Add("style", "display:none;");
                TableCell doorSwingInLBLCell = new TableCell();
                TableCell doorSwingInRADCell = new TableCell();

                Label doorSwingInLBLMain = new Label();
                doorSwingInLBLMain.ID = "lblDoorSwingMain" + title;
                doorSwingInLBLMain.Text = "Swing:";

                Label doorSwingInLBLRad = new Label();
                doorSwingInLBLRad.ID = "lblDoorSwingIn" + title;

                Label doorSwingInLBL = new Label();
                doorSwingInLBL.ID = "lblDoorSwingInRad" + title;
                doorSwingInLBL.Text = "In";

                RadioButton doorSwingInRAD = new RadioButton();
                doorSwingInRAD.ID = "radDoorSwing" + title;
                doorSwingInRAD.Attributes.Add("value", "In");
                doorSwingInRAD.GroupName = "SwingInOut" + title;

                doorSwingInLBLRad.AssociatedControlID = "radDoorSwing" + title;
                doorSwingInLBL.AssociatedControlID = "radDoorSwing" + title;

                #endregion

                #region Table:Ninth Row Door Swing Out (tblDoorDetails)

                TableRow doorSwingOutRow = new TableRow();
                doorSwingOutRow.ID = "rowDoorSwingOut" + title;
                doorSwingOutRow.Attributes.Add("style", "display:none;");
                TableCell doorSwingOutLBLCell = new TableCell();
                TableCell doorSwingOutRADCell = new TableCell();

                Label doorSwingOutLBLRad = new Label();
                doorSwingOutLBLRad.ID = "lblDoorSwingOutRad" + title;

                Label doorSwingOutLBL = new Label();
                doorSwingOutLBL.ID = "lblDoorSwingOut" + title;
                doorSwingOutLBL.Text = "Out";

                RadioButton doorSwingOutRAD = new RadioButton();
                doorSwingOutRAD.ID = "radDoorSwingOut" + title;
                doorSwingOutRAD.Attributes.Add("value", "Out");
                doorSwingOutRAD.GroupName = "SwingInOut" + title;

                doorSwingOutLBLRad.AssociatedControlID = "radDoorSwingOut" + title;
                doorSwingOutLBL.AssociatedControlID = "radDoorSwingOut" + title;

                #endregion

                #region Table:# Row Door Position DDL (tblDoorDetails)

                TableRow doorPositionDDLRow = new TableRow();
                doorPositionDDLRow.ID = "rowDoorPosition" + title;
                doorPositionDDLRow.Attributes.Add("style", "display:none;");
                TableCell doorPositionDDLLBLCell = new TableCell();
                TableCell doorPositionDDLDDLCell = new TableCell();

                Label doorPositionDDLLBL = new Label();
                doorPositionDDLLBL.ID = "lblDoorPositionDDL" + title;
                doorPositionDDLLBL.Text = "Position In Wall:";

                DropDownList doorPositionDDLDDL = new DropDownList();
                doorPositionDDLDDL.ID = "ddlDoorPosition" + title;
                doorPositionDDLDDL.Attributes.Add("onchange", "customDimension('" + title + "','Position')");
                for (int j = 0; j < Constants.DOOR_POSITION.Count(); j++)
                {
                    if (Constants.DOOR_POSITION[j] == "Custom")
                    {
                        doorPositionDDLDDL.Items.Add(new ListItem(Constants.DOOR_POSITION[j], "cPosition"));
                    }
                    else
                    {
                        doorPositionDDLDDL.Items.Add(new ListItem(Constants.DOOR_POSITION[j], Constants.DOOR_POSITION[j]));
                    }
                }

                doorPositionDDLLBL.AssociatedControlID = "ddlDoorPosition" + title;

                #endregion

                #region Table:# Row Add This Door (tblDoorDetails)

                TableRow doorButtonRow = new TableRow();
                doorButtonRow.ID = "rowAddDoor" + title;
                doorButtonRow.Attributes.Add("style", "display:inherit;");
                TableCell doorAddButtonCell = new TableCell();
                TableCell doorFillButtonCell = new TableCell();

                Button doorButton = new Button();
                doorButton.ID = "btnAdd" + title;
                doorButton.Text = "Add this " + title + " door";
                doorButton.CssClass = "btnSubmit";
                //doorButton.Attributes.Add("click", "addDoor(\"" + title + "\")");

                #endregion

                //Adding to table

                #region Table:Default Row Title Current Door Added To Table (tblDoorDetails)

                doorTitleLBLCell.Controls.Add(doorTitleLBL);

                tblDoorDetails.Rows.Add(doorTitleRow);

                doorTitleRow.Cells.Add(doorTitleLBLCell);

                #endregion

                #region Table:Second Row Style Of Door Added To Table (tblDoorDetails)

                doorStyleLBLCell.Controls.Add(doorStyleLBL);
                doorStyleDDLCell.Controls.Add(doorStyleDDL);

                tblDoorDetails.Rows.Add(doorStyleRow);

                doorStyleRow.Cells.Add(doorStyleLBLCell);
                doorStyleRow.Cells.Add(doorStyleDDLCell);

                #endregion

                #region Comment V4T Stuff
                /*
                #region Table:Twelfth Row Door V4T Number Of Vents Added To Table (tblDoorDetails)

                doorNumberOfVentsLBLCell.Controls.Add(doorNumberOfVentsLBL);
                doorNumberOfVentsDDLCell.Controls.Add(doorNumberOfVentsDDL);

                tblDoorDetails.Rows.Add(doorNumberOfVentsRow);

                doorNumberOfVentsRow.Cells.Add(doorNumberOfVentsLBLCell);
                doorNumberOfVentsRow.Cells.Add(doorNumberOfVentsDDLCell);

                #endregion

                */
                #endregion

                #region Table:Sixteenth Row Door V4T Vinyl Tint (tblDoorDetails)

                doorVinylTintLBLCell.Controls.Add(doorVinylTintLBL);
                doorVinylTintDDLCell.Controls.Add(doorVinylTintDDL);

                tblDoorDetails.Rows.Add(doorVinylTintRow);

                doorVinylTintRow.Cells.Add(doorVinylTintLBLCell);
                doorVinylTintRow.Cells.Add(doorVinylTintDDLCell);

                addMixedTintDropdowns(title, tblDoorDetails);

                #endregion

                #region Table:# Row Door Transom Vinyl Types Added To Table (tblDoorDetails)

                doorTransomVinylTypesLBLCell.Controls.Add(doorTransomVinylLBL);
                doorTransomVinylTypesDDLCell.Controls.Add(doorTransomVinylDDL);

                tblDoorDetails.Rows.Add(doorTransomVinylRow);

                doorTransomVinylRow.Cells.Add(doorTransomVinylTypesLBLCell);
                doorTransomVinylRow.Cells.Add(doorTransomVinylTypesDDLCell);

                #endregion

                #region Table:# Row Door Transom Glass Types Added To Table (tblDoorDetails)

                doorTransomGlassTypesLBLCell.Controls.Add(doorTransomGlassLBL);
                doorTransomGlassTypesDDLCell.Controls.Add(doorTransomGlassDDL);

                tblDoorDetails.Rows.Add(doorTransomGlassRow);

                doorTransomGlassRow.Cells.Add(doorTransomGlassTypesLBLCell);
                doorTransomGlassRow.Cells.Add(doorTransomGlassTypesDDLCell);

                #endregion

                #region Table:# Row Door Kickplate (tblDoorDetails)

                doorKickplateLBLCell.Controls.Add(doorKickplateLBL);
                doorKickplateDDLCell.Controls.Add(doorKickplateDDL);

                tblDoorDetails.Rows.Add(doorKickplateRow);

                doorKickplateRow.Cells.Add(doorKickplateLBLCell);
                doorKickplateRow.Cells.Add(doorKickplateDDLCell);

                #endregion

                #region Table:# Row Door Kickplate Custom (tblDoorDetails)

                doorCustomKickplateLBLCell.Controls.Add(doorCustomKickplateLBL);
                doorCustomKickplateTXTCell.Controls.Add(doorCustomKickplateTXT);
                doorCustomKickplateDDLCell.Controls.Add(inchCustomKickplate);

                tblDoorDetails.Rows.Add(doorCustomKickplateRow);

                doorCustomKickplateRow.Cells.Add(doorCustomKickplateLBLCell);
                doorCustomKickplateRow.Cells.Add(doorCustomKickplateTXTCell);
                doorCustomKickplateRow.Cells.Add(doorCustomKickplateDDLCell);

                #endregion

                #region Table:Third Row Color of Door Added to Table (tblDoorDetails)

                colourOfDoorLBLCell.Controls.Add(colourOfDoorLBL);
                colourOfDoorDDLCell.Controls.Add(colourOfDoorDDL);

                tblDoorDetails.Rows.Add(colourOfDoorRow);

                colourOfDoorRow.Cells.Add(colourOfDoorLBLCell);
                colourOfDoorRow.Cells.Add(colourOfDoorDDLCell);

                #endregion

                #region Table:Height

                doorHeightLBLCell.Controls.Add(doorHeightLBL);
                doorHeightTXTCell.Controls.Add(doorHeightTXT);
                doorHeightDDLCell.Controls.Add(inchHeight);

                tblDoorDetails.Rows.Add(doorHeightRow);

                doorHeightRow.Cells.Add(doorHeightLBLCell);
                doorHeightRow.Cells.Add(doorHeightTXTCell);
                doorHeightRow.Cells.Add(doorHeightDDLCell);

                #endregion

                #region Table:Height AsIf

                doorAsIfHeightLBLCell.Controls.Add(doorAsIfHeightLBL);
                doorAsIfHeightTXTCell.Controls.Add(doorAsIfHeightTXT);
                doorAsIfHeightDDLCell.Controls.Add(inchAsIfHeight);

                tblDoorDetails.Rows.Add(doorAsIfHeightRow);

                doorAsIfHeightRow.Cells.Add(doorAsIfHeightLBLCell);
                doorAsIfHeightRow.Cells.Add(doorAsIfHeightTXTCell);
                doorAsIfHeightRow.Cells.Add(doorAsIfHeightDDLCell);

                #endregion

                #region Table:Width

                doorWidthLBLCell.Controls.Add(doorWidthLBL);
                doorWidthTXTCell.Controls.Add(doorWidthTXT);
                doorWidthDDLCell.Controls.Add(inchWidth);

                tblDoorDetails.Rows.Add(doorWidthRow);

                doorWidthRow.Cells.Add(doorWidthLBLCell);
                doorWidthRow.Cells.Add(doorWidthTXTCell);
                doorWidthRow.Cells.Add(doorWidthDDLCell);

                #endregion

                #region Table:V4T Number of Vents

                doorV4TNumberOfVentsLBLCell.Controls.Add(doorV4TNumberOfVentsLBL);
                doorV4TNumberOfVentsDDLCell.Controls.Add(doorV4TNumberOfVentsDDL);

                doorV4TNumberOfVentsRow.Cells.Add(doorV4TNumberOfVentsLBLCell);
                doorV4TNumberOfVentsRow.Cells.Add(doorV4TNumberOfVentsDDLCell);

                doorUnevenVentsCHKCell.Controls.Add(doorUnevenVentsCHK);
                doorUnevenVentsCHKCell.Controls.Add(doorUnevenVentsLBLChk);
                doorUnevenVentsCHKCell.Controls.Add(doorUnevenVentsLBL);

                doorV4TNumberOfVentsRow.Cells.Add(doorUnevenVentsCHKCell);

                tblDoorDetails.Rows.Add(doorV4TNumberOfVentsRow);

                #endregion

                #region Table:Uneven vents

                tblDoorDetails.Rows.Add(doorTopBottomBothRadRow);

                doorTopBottomBothRadRow.Cells.Add(doorTopRadCell);
                doorTopBottomBothRadRow.Cells.Add(doorBottomRadCell);
                doorTopBottomBothRadRow.Cells.Add(doorBothRadCell);

                doorUnevenVentsRowTop.Cells.Add(doorTopVentLBLCell);
                doorUnevenVentsRowTop.Cells.Add(doorTopVentTXTCell);

                tblDoorDetails.Rows.Add(doorUnevenVentsRowTop);

                doorUnevenVentsRowBottom.Cells.Add(doorBottomVentLBLCell);
                doorUnevenVentsRowBottom.Cells.Add(doorBottomVentTXTCell);
                //doorUnevenVentsRowBottom.Cells.Add(doorBottomVentDDLCell);

                tblDoorDetails.Rows.Add(doorUnevenVentsRowBottom);

                #endregion

                #region Commented Dimension Stuff
                /*
                #region Table:Fourth Row Height Of Door Added To Table (tblDoorDetails)

                doorHeightLBLCell.Controls.Add(doorHeightLBL);
                doorHeightDDLCell.Controls.Add(doorHeightDDL);

                tblDoorDetails.Rows.Add(doorHeightRow);

                doorHeightRow.Cells.Add(doorHeightLBLCell);
                doorHeightRow.Cells.Add(doorHeightDDLCell);

                #endregion

                #region Table:Sixth Row Custom Height Of Door Added To Table (tblDoorDetails)

                doorCustomHeightLBLCell.Controls.Add(doorCustomHeightLBL);
                doorCustomHeightTXTCell.Controls.Add(doorCustomHeightTXT);
                doorCustomHeightDDLCell.Controls.Add(inchCustomHeight);

                tblDoorDetails.Rows.Add(doorCustomHeightRow);

                doorCustomHeightRow.Cells.Add(doorCustomHeightLBLCell);
                doorCustomHeightRow.Cells.Add(doorCustomHeightTXTCell);
                doorCustomHeightRow.Cells.Add(doorCustomHeightDDLCell);

                #endregion

                #region Table:Fifth Row Width Of Door Added To Table (tblDoorDetails)

                doorWidthLBLCell.Controls.Add(doorWidthLBL);
                doorWidthDDLCell.Controls.Add(doorWidthDDL);

                tblDoorDetails.Rows.Add(doorWidthRow);

                doorWidthRow.Cells.Add(doorWidthLBLCell);
                doorWidthRow.Cells.Add(doorWidthDDLCell);

                #endregion

                #region Table:Seventh Row Custom Width Of Door Added To Table (tblDoorDetails)

                doorCustomWidthLBLCell.Controls.Add(doorCustomWidthLBL);
                doorCustomWidthTXTCell.Controls.Add(doorCustomWidthTXT);
                doorCustomWidthDDLCell.Controls.Add(inchCustomWidth);

                tblDoorDetails.Rows.Add(doorCustomWidthRow);

                doorCustomWidthRow.Cells.Add(doorCustomWidthLBLCell);
                doorCustomWidthRow.Cells.Add(doorCustomWidthTXTCell);
                doorCustomWidthRow.Cells.Add(doorCustomWidthDDLCell);

                #endregion
                 */
                #endregion

                #region Table:Eight Row Door Primary Operator LHH Added To Table (tblDoorDetails)

                doorOperatorLHHLBLCell.Controls.Add(doorOperatorLHHLBLMain);

                doorOperatorLHHRADCell.Controls.Add(doorOperatorLHHRad);
                doorOperatorLHHRADCell.Controls.Add(doorOperatorLHHLBLRad);
                doorOperatorLHHRADCell.Controls.Add(doorOperatorLHHLBL);

                tblDoorDetails.Rows.Add(doorOperatorLHHRow);

                doorOperatorLHHRow.Cells.Add(doorOperatorLHHLBLCell);
                doorOperatorLHHRow.Cells.Add(doorOperatorLHHRADCell);

                #endregion

                #region Table:Ninth Row Door Primary Operator RHH Added To Table (tblDoorDetails)

                doorOperatorRHHRADCell.Controls.Add(doorOperatorRHHRad);
                doorOperatorRHHRADCell.Controls.Add(doorOperatorRHHLBLRad);
                doorOperatorRHHRADCell.Controls.Add(doorOperatorRHHLBL);

                tblDoorDetails.Rows.Add(doorOperatorRHHRow);

                doorOperatorRHHRow.Cells.Add(doorOperatorRHHLBLCell);
                doorOperatorRHHRow.Cells.Add(doorOperatorRHHRADCell);

                #endregion

                #region Table:Tenth Row Door Box Header Position (tblDoorDetails)

                doorBoxHeaderLBLCell.Controls.Add(doorBoxHeaderLBL);
                doorBoxHeaderDDLCell.Controls.Add(doorBoxHeaderDDL);

                tblDoorDetails.Rows.Add(doorBoxHeaderRow);

                doorBoxHeaderRow.Cells.Add(doorBoxHeaderLBLCell);
                doorBoxHeaderRow.Cells.Add(doorBoxHeaderDDLCell);

                #endregion

                #region Table:Thirteenth Row Door Glass Tint Added To Table (tblDoorDetails)

                doorGlassTintLBLCell.Controls.Add(doorGlassTintLBL);
                doorGlassTintDDLCell.Controls.Add(doorGlassTintDDL);

                tblDoorDetails.Rows.Add(doorGlassTintRow);

                doorGlassTintRow.Cells.Add(doorGlassTintLBLCell);
                doorGlassTintRow.Cells.Add(doorGlassTintDDLCell);

                #endregion

                #region Table:Tenth Row Door Hinge LHH Added To Table (tblDoorDetails)

                doorHingeLHHLBLCell.Controls.Add(doorHingeLHHLBLMain);

                doorHingeLHHRADCell.Controls.Add(doorHingeLHHRad);
                doorHingeLHHRADCell.Controls.Add(doorHingeLHHLBLRad);
                doorHingeLHHRADCell.Controls.Add(doorHingeLHHLBL);

                tblDoorDetails.Rows.Add(doorHingeLHHRow);

                doorHingeLHHRow.Cells.Add(doorHingeLHHLBLCell);
                doorHingeLHHRow.Cells.Add(doorHingeLHHRADCell);

                #endregion

                #region Table:Eleventh Row Door Hinge RHH Added To Table (tblDoorDetails)

                doorHingeRHHRADCell.Controls.Add(doorHingeRHHRad);
                doorHingeRHHRADCell.Controls.Add(doorHingeRHHLBLRad);
                doorHingeRHHRADCell.Controls.Add(doorHingeRHHLBL);

                tblDoorDetails.Rows.Add(doorHingeRHHRow);

                doorHingeRHHRow.Cells.Add(doorHingeRHHLBLCell);
                doorHingeRHHRow.Cells.Add(doorHingeRHHRADCell);

                #endregion

                #region Table:Fourteenth Row Door Screen Options Added To Table (tblDoorDetails)

                doorScreenTypesLBLCell.Controls.Add(doorScreenTypesLBL);
                doorScreenTypesDDLCell.Controls.Add(doorScreenTypesDDL);

                tblDoorDetails.Rows.Add(doorScreenTypesRow);

                doorScreenTypesRow.Cells.Add(doorScreenTypesLBLCell);
                doorScreenTypesRow.Cells.Add(doorScreenTypesDDLCell);

                #endregion

                #region Table:Fifteenth Row Door Hardware Added To Table (tblDoorDetails)

                doorHardwareLBLCell.Controls.Add(doorHardwareLBL);
                doorHardwareDDLCell.Controls.Add(doorHardwareDDL);

                tblDoorDetails.Rows.Add(doorHardwareRow);

                doorHardwareRow.Cells.Add(doorHardwareLBLCell);
                doorHardwareRow.Cells.Add(doorHardwareDDLCell);

                #endregion

                #region Table:Eight Row Swing In Added To Table (tblDoorDetails)

                doorSwingInLBLCell.Controls.Add(doorSwingInLBLMain);

                doorSwingInRADCell.Controls.Add(doorSwingInRAD);
                doorSwingInRADCell.Controls.Add(doorSwingInLBLRad);
                doorSwingInRADCell.Controls.Add(doorSwingInLBL);

                tblDoorDetails.Rows.Add(doorSwingInRow);

                doorSwingInRow.Cells.Add(doorSwingInLBLCell);
                doorSwingInRow.Cells.Add(doorSwingInRADCell);

                #endregion

                #region Table:Ninth Row Swing Out Added To Table (tblDoorDetails)

                doorSwingOutRADCell.Controls.Add(doorSwingOutRAD);
                doorSwingOutRADCell.Controls.Add(doorSwingOutLBLRad);
                doorSwingOutRADCell.Controls.Add(doorSwingOutLBL);

                tblDoorDetails.Rows.Add(doorSwingOutRow);

                doorSwingOutRow.Cells.Add(doorSwingOutLBLCell);
                doorSwingOutRow.Cells.Add(doorSwingOutRADCell);

                #endregion

                #region Table:# Row Add This Door (tblDoorDetails)

                //doorAddButtonCell.Controls.Add(new LiteralControl("<input id='btnAddthisDoor" + title + "' type='button' onclick='addDoor(\"" + title + "\")' class='btnSubmit' style='display:inherit;' value='Add This " + title + " Door'/>"));
                doorAddButtonCell.Controls.Add(doorButton);

                tblDoorDetails.Rows.Add(doorButtonRow);

                doorButtonRow.Cells.Add(doorAddButtonCell);

                #endregion

                //Adding literal control div tag to hold the table, add to DoorOptions placeholder
                DoorOptions.Controls.Add(new LiteralControl("<div class=\"toggleContent\" id=\"div_" + title + "\">"));

                DoorOptions.Controls.Add(new LiteralControl("<ul>"));

                //Adding literal control li to keep proper page look and format
                DoorOptions.Controls.Add(new LiteralControl("<li>"));

                //Adding table to placeholder DoorOptions
                DoorOptions.Controls.Add(tblDoorDetails);

                //Closing necessary tags
                DoorOptions.Controls.Add(new LiteralControl("</li>"));

                DoorOptions.Controls.Add(new LiteralControl("</ul>"));

                DoorOptions.Controls.Add(new LiteralControl("</div>"));

                DoorOptions.Controls.Add(new LiteralControl("</li>"));

            }
            #endregion

            populateSideBar(findNumberOfDoorTypes());

            using (SqlConnection aConnection = new SqlConnection(sdsDBConnection.ConnectionString))
            {

                aConnection.Open();
                SqlCommand aCommand = aConnection.CreateCommand();
                SqlTransaction aTransaction;
                //SqlDataReader aReader;

                // Start a local transaction.
                aTransaction = aConnection.BeginTransaction("SampleTransaction");

                // Must assign both transaction object and connection
                // to Command object for a pending local transaction
                aCommand.Connection = aConnection;
                aCommand.Transaction = aTransaction;

                // Door variables
                string doorType;
                string doorStyle;
                string screenType;
                float height;
                float length;
                string doorColour;
                float kickPlate;

                // Specific Doors
                string vinylTint;
                string glassTint;
                string hinge;
                string swing;
                bool operatorBool;
                string hardwareType;
                bool movingDoor;

                try
                {
                    //get the door
                    aCommand.CommandText = "SELECT door_type, door_style, screen_type, height, length, door_colour, kick_plate FROM doors WHERE project_id = '" + projectId + "'";
                    SqlDataReader projectReader = aCommand.ExecuteReader();

                    // If the door is found
                    if (projectReader.HasRows)
                    {
                        projectReader.Read();

                        // Populate the door fields
                        doorType = Convert.ToString(projectReader[0]);
                        doorStyle = Convert.ToString(projectReader[1]);
                        screenType = Convert.ToString(projectReader[2]);
                        height = Convert.ToSingle(projectReader[3]);
                        length = Convert.ToSingle(projectReader[4]);
                        doorColour = Convert.ToString(projectReader[5]);
                        kickPlate = Convert.ToSingle(projectReader[6]);

                        projectReader.Close();

                        // Populate cabana fields
                        if (doorType == "Cabana")
                        {
                            aCommand.CommandText = "SELECT vinyl_tint, glass_tint, hinge, swing, hardware_type FROM cabana_doors WHERE project_id = '" + projectId + "' AND linear_index = 0 AND module_index = 0";
                            projectReader = aCommand.ExecuteReader();

                            // If the cabana door is found
                            if (projectReader.HasRows)
                            {
                                projectReader.Read();

                                // Create a cabana door for JSON
                                CabanaDoor tempDoor = new CabanaDoor();
                                tempDoor.DoorType = doorType;
                                tempDoor.DoorStyle = doorStyle;
                                tempDoor.ScreenType = screenType;
                                tempDoor.Height = height;
                                tempDoor.Length = length;
                                tempDoor.Colour = doorColour;
                                tempDoor.Kickplate = kickPlate;
                                tempDoor.VinylTint = Convert.ToString(projectReader[0]);
                                tempDoor.GlassTint = Convert.ToString(projectReader[1]);
                                tempDoor.Hinge = Convert.ToString(projectReader[2]);
                                tempDoor.Swing = Convert.ToString(projectReader[3]);
                                tempDoor.HardwareType = Convert.ToString(projectReader[4]);
                                // Create a JSON serialize object
                                json = JsonConvert.SerializeObject(tempDoor);
                                // Store the door in a hidden filed
                                hidRealHidden.Value = json;

                                projectReader.Close();

                                //// Populate the door table fields
                                //DropDownList ddlDoorType = this.FindControl("ctl00$MainContent$ddlDoorStyleCabana") as DropDownList;
                                //ddlDoorType.SelectedValue = doorType;
                                //DropDownList ddlDoorStyle = this.FindControl("ctl00$MainContent$ddlDoorStyleCabana") as DropDownList;
                                //ddlDoorStyle.SelectedValue = doorStyle;
                                //DropDownList ddlScreenType = this.FindControl("ctl00$MainContent$ddlDoorScreenTypesCabana") as DropDownList;
                                //ddlScreenType.SelectedValue = screenType;
                                //TextBox txtHeight = this.FindControl("ctl00$MainContent$txtDoorHeightCabana") as TextBox;
                                //txtHeight.Text = Convert.ToString(height);
                                //TextBox txtLength = this.FindControl("ctl00$MainContent$txtDoorWidthCabana") as TextBox;
                                //txtLength.Text = Convert.ToString(length);
                                //DropDownList ddlDoorColour = this.FindControl("ctl00$MainContent$ddlDoorColourCabana") as DropDownList;
                                //ddlScreenType.SelectedValue = doorColour;
                                //DropDownList ddlKickPlate = this.FindControl("ctl00$MainContent$ddlDoorKickplateCabana") as DropDownList;
                                //ddlKickPlate.SelectedValue = Convert.ToString(kickPlate) + '"';
                                //// Populate the cabana door specified fields
                                //DropDownList ddlVinylTint = this.FindControl("ctl00$MainContent$ddlDoorVinylTintCabana") as DropDownList;
                                ////ddlVinylTint.SelectedValue = vinylTint;
                                //DropDownList ddlGlassTint = this.FindControl("ctl00$MainContent$ddlDoorGlassTintCabana") as DropDownList;
                                ////ddlGlassTint.SelectedValue = glassTint;
                                //DropDownList ddlHardwareType = this.FindControl("ctl00$MainContent$ddlDoorHardwareCabana") as DropDownList;
                                ////ddlHardwareType.SelectedValue = hardwareType;

                                //// Getting null from radio buttons / radio button list
                                //RadioButton radHinge = this.FindControl("ctl00$MainContent$DoorHingeCabana") as RadioButton;

                            }
                        }
                        // Populate french fields
                        else if (doorType == "French")
                        {
                            aCommand.CommandText = "SELECT vinyl_tint, glass_tint, swing, operator, hardware_type FROM french_doors WHERE project_id = '" + projectId + "' AND linear_index = 0 AND module_index = 0";
                            projectReader = aCommand.ExecuteReader();

                            if (projectReader.HasRows)
                            {
                                projectReader.Read();

                                // Create a cabana door for JSON
                                FrenchDoor tempDoor = new FrenchDoor();
                                tempDoor.DoorType = doorType;
                                tempDoor.DoorStyle = doorStyle;
                                tempDoor.ScreenType = screenType;
                                tempDoor.Height = height;
                                tempDoor.Length = length;
                                tempDoor.Colour = doorColour;
                                tempDoor.Kickplate = kickPlate;
                                tempDoor.VinylTint = Convert.ToString(projectReader[0]);
                                tempDoor.GlassTint = Convert.ToString(projectReader[1]);
                                tempDoor.Swing = Convert.ToString(projectReader[2]);
                                tempDoor.OperatingDoor = Convert.ToString(projectReader[3]);
                                tempDoor.HardwareType = Convert.ToString(projectReader[4]);
                                // Create a JSON serialize object
                                json = JsonConvert.SerializeObject(tempDoor);
                                // Store the door in a hidden filed
                                hidRealHidden.Value = json;

                                projectReader.Close();

                                //// Populate the door table fields
                                //DropDownList ddlDoorType = this.FindControl("ctl00$MainContent$ddlDoorStyleFrench") as DropDownList;
                                //ddlDoorType.SelectedValue = doorType;
                                //DropDownList ddlDoorStyle = this.FindControl("ctl00$MainContent$ddlDoorStyleFrench") as DropDownList;
                                //ddlDoorStyle.SelectedValue = doorStyle;
                                //DropDownList ddlScreenType = this.FindControl("ctl00$MainContent$ddlDoorScreenTypesFrench") as DropDownList;
                                //ddlScreenType.SelectedValue = screenType;
                                //TextBox txtHeight = this.FindControl("ctl00$MainContent$txtDoorHeightFrench") as TextBox;
                                //txtHeight.Text = Convert.ToString(height);
                                //TextBox txtLength = this.FindControl("ctl00$MainContent$txtDoorWidthFrench") as TextBox;
                                //txtLength.Text = Convert.ToString(length);
                                //DropDownList ddlDoorColour = this.FindControl("ctl00$MainContent$ddlDoorColourFrench") as DropDownList;
                                //ddlScreenType.SelectedValue = doorColour;
                                //DropDownList ddlKickPlate = this.FindControl("ctl00$MainContent$ddlDoorKickplateFrench") as DropDownList;
                                //ddlKickPlate.SelectedValue = Convert.ToString(kickPlate) + '"';

                                //// Populate the french door fields
                                //DropDownList ddlVinylTint = this.FindControl("ctl00$MainContent$ddlDoorVinylTintFrench") as DropDownList;
                                //ddlVinylTint.SelectedValue = vinylTint;
                                //DropDownList ddlGlassTint = this.FindControl("ctl00$MainContent$ddlDoorGlassTintFrench") as DropDownList;
                                //ddlGlassTint.SelectedValue = glassTint;
                                //DropDownList ddlHardwareType = this.FindControl("ctl00$MainContent$ddlDoorHardwareFrench") as DropDownList;
                                //ddlHardwareType.SelectedValue = hardwareType;
                            }
                        }
                        // Populate patio doors
                        else
                        {
                            aCommand.CommandText = "SELECT glass_tint, moving_door FROM patio_doors WHERE project_id = '" + projectId + "' AND linear_index = 0 AND module_index = 0";
                            projectReader = aCommand.ExecuteReader();

                            if (projectReader.HasRows)
                            {
                                projectReader.Read();

                                // Create a cabana door for JSON
                                PatioDoor tempDoor = new PatioDoor();
                                tempDoor.DoorType = doorType;
                                tempDoor.DoorStyle = doorStyle;
                                tempDoor.ScreenType = screenType;
                                tempDoor.Height = height;
                                tempDoor.Length = length;
                                tempDoor.Colour = doorColour;
                                tempDoor.Kickplate = kickPlate;
                                tempDoor.GlassTint = Convert.ToString(projectReader[0]);
                                tempDoor.MovingDoor = Convert.ToString(projectReader[1]);
                                // Create a JSON serialize object
                                json = JsonConvert.SerializeObject(tempDoor);
                                // Store the door in a hidden filed
                                hidRealHidden.Value = json;

                                projectReader.Close();

                                //// Populate the door table fields
                                //DropDownList ddlDoorType = this.FindControl("ctl00$MainContent$ddlDoorStylePatio") as DropDownList;
                                //ddlDoorType.SelectedValue = doorType;
                                //DropDownList ddlDoorStyle = this.FindControl("ctl00$MainContent$ddlDoorStylePatio") as DropDownList;
                                //ddlDoorStyle.SelectedValue = doorStyle;
                                //DropDownList ddlScreenType = this.FindControl("ctl00$MainContent$ddlDoorScreenTypesPatio") as DropDownList;
                                //ddlScreenType.SelectedValue = screenType;
                                //TextBox txtHeight = this.FindControl("ctl00$MainContent$txtDoorHeightPatio") as TextBox;
                                //txtHeight.Text = Convert.ToString(height);
                                //TextBox txtLength = this.FindControl("ctl00$MainContent$txtDoorWidthPatio") as TextBox;
                                //txtLength.Text = Convert.ToString(length);
                                //DropDownList ddlDoorColour = this.FindControl("ctl00$MainContent$ddlDoorColourPatio") as DropDownList;
                                //ddlScreenType.SelectedValue = doorColour;
                                //DropDownList ddlKickPlate = this.FindControl("ctl00$MainContent$ddlDoorKickplatePatio") as DropDownList;
                                //ddlKickPlate.SelectedValue = Convert.ToString(kickPlate) + '"';

                                //// Populate the french door fields
                                //DropDownList ddlGlassTint = this.FindControl("ctl00$MainContent$ddlDoorGlassTintPatio") as DropDownList;
                                //ddlGlassTint.SelectedValue = glassTint;
                            }

                        }
                    }
                }
                catch (Exception ex)
                {
                    //lblError.Text = "Commit Exception Type: " + ex.GetType();
                    //lblError.Text += "  Message: " + ex.Message;

                    // Attempt to roll back the transaction.
                    try
                    {
                        aTransaction.Rollback();
                    }
                    catch (Exception ex2)
                    {
                        //This catch block will handle any errors that may have occurred
                        //on the server that would cause the rollback to fail, such as
                        //a closed connection.
                        //lblError.Text = "Rollback Exception Type: " + ex2.GetType();
                        //lblError.Text += "  Message: " + ex2.Message;
                    }
                }
            }
        }
Пример #45
0
 //--------------------------------------------------------------
 protected void Page_Init(object sender, EventArgs e)
 {
     _radio = new System.Web.UI.WebControls.RadioButton();
     ID = "radio" + Guid.NewGuid().ToString();
     Controls.Add(_radio);
 }
Пример #46
0
        protected void Page_Load(object sender, EventArgs e)
        {
            blRecetas = new BlRecetas();
            Hashtable htbPermisos = (Hashtable)Session["permisos"];
            char cPermiso = 'N';

            try
            {
                Master.FindControl("btnReportes").Visible = false;

                cPermiso = (char)htbPermisos["recetas"];
                oblColonias = new MedNeg.Colonias.BlColonias();
                oblPoblaciones = new MedNeg.Poblaciones.BlPoblaciones();
                oblMunicipios = new MedNeg.Municipios.BlMunicipios();
                oblEstados = new MedNeg.Estados.BlEstados();
                imbAceptar = (ImageButton)Master.FindControl("imgBtnAceptar");
                imbAceptar.Click += new ImageClickEventHandler(imbAceptar_Click);
                imbMostrar = (ImageButton)Master.FindControl("imgBtnMostrar");
                imbMostrar.Click += new ImageClickEventHandler(imbMostrar_Click);
                imbNuevo = (ImageButton)Master.FindControl("imgBtnNuevo");
                imbNuevo.Click += new ImageClickEventHandler(imbNuevo_Click);
                imbEditar = (ImageButton)Master.FindControl("imgBtnEditar");
                imbEditar.Click += new ImageClickEventHandler(imbEditar_Click);
                imbImprimir = (ImageButton)Master.FindControl("imgBtnImprimir");
                imbImprimir.Click += new ImageClickEventHandler(imbImprimir_Click);
                imbCancelar = (ImageButton)Master.FindControl("imgBtnCancelar");
                imbCancelar.Click += new ImageClickEventHandler(this.imbCancelar_Click);
                rdbFolio = (RadioButton)Master.FindControl("rdbFiltro1");
                rdbFolio.Text = "Folio";
                rdbTipo = (RadioButton)Master.FindControl("rdbFiltro2");
                rdbTipo.Text = "Tipo";
                rdbFecha = (RadioButton)Master.FindControl("rdbFiltro3");
                rdbFecha.Text = "Fecha";
                rdbFecha.AutoPostBack = true;
                btnBuscar = (Button)Master.FindControl("btnBuscar");
                btnBuscar.Click += new EventHandler(btnBuscar_Click);
                txbBuscar = (TextBox)Master.FindControl("txtBuscar");
                lblNombreModulo = (Label)Master.FindControl("lblNombreModulo");
                lblNombreModulo.Text = "Recetas";
                lblAvisosVendedores.Text = "";

                //GT 0175
                imbReportes = (ImageButton)Master.FindControl("imgBtnReportes");
                imbReportes.Click += new ImageClickEventHandler(this.imbReportes_Click);                

                oCalendarExtender = new AjaxControlToolkit.CalendarExtender();
                oCalendarExtender.TargetControlID = "txbBuscar";

                oblBitacoraFaltantes = new MedNeg.BitacoraFaltantes.BlBitacoraFaltantes();
                oblRecetasPartidaFaltantes = new MedNeg.RecetasPartidaFaltantes.BlRecetasPartidaFaltantes();
                oblRecetas = new BlRecetas();
                oblProductos = new MedNeg.Productos.BlProductos();

                txbCantRecetada.TextChanged += new EventHandler(this.txbCantRecetada_TextChanged);
                txbCantSurtida.TextChanged += new EventHandler(this.txbCantSurtida_TextChanged);
                

                if (!IsPostBack)
                {   
                    oCalendarExtender.Enabled = false;
                    user = blRecetas.buscarUsuario(Session["usuario"].ToString());
                    Session["lstrecetaspartida"] = new List<MedDAL.DAL.recetas_partida>();
                    Session["lstrecetaspartidaedicion"] = new List<MedDAL.DAL.recetas_partida>();
                    lProductos = new List<Producto>();
                    Session["resultadoquery"] = "";
                    ViewState["direccionsorting"] = System.Web.UI.WebControls.SortDirection.Ascending;
                    Session["recetasIdCliente"] = 0;
                    Session["recetasIdCausesCie"] = null;
                    Session["reporteactivo"] = 0;
                    Session["reportdocument"] = "";
                    Session["titulo"] = "";
                    estadoActual = 0;
                    //GT 0175
                    ConfigurarMenuBotones(true, true, false, false, false, false, true, true);
                }

                dgvPartidaDetalle.DataSource = ((List<MedDAL.DAL.recetas_partida>)Session["lstrecetaspartida"]);
                dgvPartidaDetalle.DataBind();
                
                
                if (estadoActual == 2)
                {
                    int iContador = ((List<MedDAL.DAL.recetas_partida>)Session["lstrecetaspartida"]).Count - ((List<MedDAL.DAL.recetas_partida>)Session["lstrecetaspartidaedicion"]).Count;
                    int i = 0;

                    foreach (GridViewRow oRow in dgvPartidaDetalle.Rows)
                    {
                        oRow.Cells[9].Controls.Clear();
                        i++;
                        if (i == iContador) break;
                    }
                }

                gdvContactosCliente.DataSource = ((List<MedDAL.DAL.clientes_contacto>)Session["lstContactosDB"]);
                gdvContactosCliente.DataBind();
                gdvContactosCliente.DataKeyNames = new String[] { "idContacto" };
            }
            catch (NullReferenceException)
            {
                if (!ClientScript.IsStartupScriptRegistered("alertsession"))
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(),
                        "alertsession", "alertarSesion();", true);
                }
                divFormulario.Visible = false;
                divListado.Visible = false;
                
                Site1 oPrincipal = (Site1)this.Master;
                oPrincipal.DeshabilitarControles(this);
                oPrincipal.DeshabilitarControles();
            }
        }
Пример #47
0
        public void cargarExpEncontrado(
            Expediente miExp,
            DropDownList ddluadmva,
            DropDownList ddlIduadmva,
            DropDownList ddlsubuadmva,
            DropDownList ddlidsubuadmva,
            DropDownList DdlAutorizadorExp,
            DropDownList DdlIdAutorizadorExp,
            DropDownList ddlcargoresp,
            DropDownList ddlidcargoresp,
            DropDownList DdlRespCaptura,
            DropDownList DdlIdRespCaptura,
            System.Web.UI.WebControls.TextBox TxtNomRespExp,
            System.Web.UI.WebControls.TextBox TxtCargoRespExp,
            System.Web.UI.WebControls.TextBox TxtTelRespExp,
            System.Web.UI.WebControls.TextBox TxtEmailRespExp,
            System.Web.UI.WebControls.TextBox TxtUnidAdmvaACargo,
            System.Web.UI.WebControls.TextBox TxtResumen,
            System.Web.UI.WebControls.TextBox TxtAsuntoExp,
            DropDownList DdlFuncion,
            DropDownList DdlAcceso,
            DropDownList DdlValPrim,
            System.Web.UI.WebControls.TextBox TxtFecExtIni,
            System.Web.UI.WebControls.TextBox TxtFecExtFin,
            System.Web.UI.WebControls.TextBox TxtNoLegajo,
            System.Web.UI.WebControls.TextBox TxtNoFojas,
            System.Web.UI.WebControls.RadioButton RdbSiVinculado,
            System.Web.UI.WebControls.RadioButton RdbNoVinculado,
            DropDownList DdlVincOtros,
            System.Web.UI.WebControls.CheckBox ChkPapel,
            System.Web.UI.WebControls.CheckBox ChkFoto,
            System.Web.UI.WebControls.CheckBox ChkUsb,
            System.Web.UI.WebControls.CheckBox ChkDisco,
            System.Web.UI.WebControls.TextBox TxtFrmtoSoporte,
            DropDownList DdlPlazoConser,
            DropDownList DdlTipExp,
            DropDownList DdlDestFin,
            DropDownList DdlValSec,
            System.Web.UI.WebControls.Label LblIdUbicTopog,
            DropDownList DdlNoEd,
            DropDownList DdlIdNoEd,
            System.Web.UI.WebControls.TextBox TxtNomFondo,
            DropDownList DdlNoPiso,
            DropDownList DdlIdNoPiso,
            DropDownList DdlNoPasillo,
            DropDownList DdlIdNoPasillo,
            DropDownList DdlNoEst,
            DropDownList DdlIdNoEst,
            DropDownList DdlNoChar,
            DropDownList DdlIdNoChar,
            DropDownList DdlNoCaja,
            DropDownList DdlIdNoCaja,
            System.Web.UI.WebControls.TextBox TxtDirFondo,
            System.Web.UI.WebControls.TextBox TxtObsFondo,
            DropDownList ddlidfondo,
            System.Web.UI.WebControls.TextBox TxtFechaCaptura
            )
        {
            //Unidad Administrativa Responsable
            ddlIduadmva.Text = miExp.id_unid_admva_resp;         //Seleccionr list de acuerdo a ID
            buscarNombreCorrespondiente(ddluadmva, ddlIduadmva); //Mostrar nombre correspondiente
            //Lennar List de datos siguiente (Area, depto...);
            CargarUadmva(ddlIduadmva, ddluadmva,
                         ddlsubuadmva, ddlidsubuadmva,
                         DdlAutorizadorExp, DdlIdAutorizadorExp);

            //Area, depto o Unidad Productora
            ddlidsubuadmva.Text = miExp.id_area_prod;                  //Seleccionar list de acuerdo a ID
            buscarNombreCorrespondiente(ddlsubuadmva, ddlidsubuadmva); //Mostrar nombre correspondiente
            //Lennar List de datos siguiente (Nombre del responsable);
            CargarSubUadmva(ddlIduadmva, ddlidsubuadmva,
                            ddlsubuadmva, ddlcargoresp, ddlidcargoresp,
                            DdlAutorizadorExp, DdlIdAutorizadorExp, DdlRespCaptura, DdlIdRespCaptura);

            //Nombre del responsable
            ddlidcargoresp.Text = miExp.id_resp_exp; //Seleccionar List
            buscarNombreCorrespondiente(ddlcargoresp, ddlidcargoresp);
            //LLenar datos del Jefe area, responsable del expediente
            CargarDatosResp(ddlsubuadmva, ddlidcargoresp,
                            TxtNomRespExp, TxtCargoRespExp,
                            TxtTelRespExp, TxtEmailRespExp, TxtUnidAdmvaACargo);

            TxtResumen.Text   = miExp.resumen_exp;                            //Resumen del contenido
            TxtAsuntoExp.Text = miExp.asunto_exp;                             //Asunto
            DdlFuncion.Text   = miExp.funcion_exp;                            //Funcion
            DdlAcceso.Text    = miExp.acceso_exp;                             //Acceso
            DdlValPrim.Text   = miExp.val_prim_exp;                           //Valores primarios
            TxtFecExtIni.Text = miExp.fec_ext_ini_exp.ToString("yyyy-MM-dd"); //Fecha extrema inicial
            TxtFecExtFin.Text = miExp.fec_ext_fin_exp.ToString("yyyy-MM-dd"); //Fecha extrema final
            TxtNoLegajo.Text  = miExp.no_legajo_exp.ToString();               //Numero de legado
            TxtNoFojas.Text   = miExp.no_fojas_exp.ToString();                //Numero fojas

            //Vinculacion con otro expediente
            if (miExp.vinc_otro_exp == "si")
            {
                RdbSiVinculado.Checked = true;
            }
            else if (miExp.vinc_otro_exp == "no")
            {
                RdbNoVinculado.Checked = true;
            }
            CargarVincOtros(RdbSiVinculado, RdbNoVinculado, DdlVincOtros);
            DdlVincOtros.Text    = miExp.id_exp_vincd;
            DdlVincOtros.Visible = true;

            //Formato de soporte
            if (miExp.formato_Soporte.Contains("Papel"))
            {
                ChkPapel.Checked = true;
                ChkPapel.Enabled = false;
            }
            if (miExp.formato_Soporte.Contains("Fotografía"))
            {
                ChkFoto.Checked = true;
                ChkFoto.Enabled = false;
            }
            if (miExp.formato_Soporte.Contains("USB"))
            {
                ChkUsb.Checked = true;
                ChkUsb.Enabled = false;
            }
            if (miExp.formato_Soporte.Contains("Disco"))
            {
                ChkDisco.Checked = true;
                ChkDisco.Enabled = false;
            }
            TxtFrmtoSoporte.Text    = miExp.formato_Soporte;
            TxtFrmtoSoporte.Visible = true;

            DdlPlazoConser.Text = miExp.plazo_conservacion_exp.ToString();  //Plazo de conservacion
            DdlTipExp.Text      = miExp.tipo_exp;                           //Tipo expediente
            DdlDestFin.Text     = miExp.destino_final_exp;                  //Destino final
            DdlValSec.Text      = miExp.valores_secundarios_exp;            //Valores secundarios

            //Ubicación topográfica
            LblIdUbicTopog.Text = miExp.id_ubic_topog;
            //Número de edificio
            DdlIdNoEd.Text = miExp.IdEdificio;
            buscarNombreCorrespondiente(DdlNoEd, DdlIdNoEd);
            //Cargar info piso
            CargarPisos(DdlIdNoEd, DdlNoPiso, DdlIdNoPiso, ddlidfondo,
                        TxtNomFondo, TxtDirFondo, TxtObsFondo);
            //Numero de piso
            DdlIdNoPiso.Text = miExp.IdPisoEd;
            buscarNombreCorrespondiente(DdlNoPiso, DdlIdNoPiso);
            //Cargar pasillos
            CargarPasillos(DdlIdNoPiso, DdlNoPasillo, DdlIdNoPasillo);
            //Numero de pasillo
            DdlIdNoPasillo.Text = miExp.IdPasillo;
            buscarNombreCorrespondiente(DdlNoPasillo, DdlIdNoPasillo);
            //Cargar Estantes
            CargarEstantes(DdlIdNoPasillo, DdlNoEst, DdlIdNoEst);
            //Numero estante
            DdlIdNoEst.Text = miExp.IdEstante;
            buscarNombreCorrespondiente(DdlNoEst, DdlIdNoEst);
            //Cargar charolas
            CargarCharolas(DdlIdNoEst, DdlNoChar, DdlIdNoChar);
            //Numero charola
            DdlIdNoChar.Text = miExp.IdCharola;
            buscarNombreCorrespondiente(DdlNoChar, DdlIdNoChar);
            //Cargar unidad de instalacion
            CargarUnidCajas(DdlIdNoChar, DdlNoCaja, DdlIdNoCaja);
            //Unidad de instalacion o numero de la caja
            DdlIdNoCaja.Text = miExp.IdUnidInsCaja;
            buscarNombreCorrespondiente(DdlNoCaja, DdlIdNoCaja);

            //Lugar, fecha
            TxtFechaCaptura.Text = miExp.fecha_alta_exp.ToString("yyyy-MM-dd");
            //Capturado por
            DdlIdRespCaptura.Text = miExp.id_capturista_exp;
            buscarNombreCorrespondiente(DdlRespCaptura, DdlIdRespCaptura);
            //Autorizado por
            DdlIdAutorizadorExp.Text = miExp.id_autorizador_exp;
            buscarNombreCorrespondiente(DdlAutorizadorExp, DdlIdAutorizadorExp);
        }
        private TableRow GetArticleSearchRow()
        {
            TableRow row = new TableRow();
            TableCell cell = new TableCell();
            Panel userControlGroup = new Panel();

            dialogButton = new HtmlButton();

            articleID = new HiddenField();
            articleID.ID = "articleID";
            articleTitle = new HiddenField();
            articleTitle.ID = "articleTitle";
            dialogButton.ID = "btnsearch";
            dialogButton.Attributes.Add("class", "UserButton");

            StringBuilder text = new StringBuilder();
            text.Append("<script type=\"text/javascript\">");
            text.Append("function CloseCallback(dialogResult, returnValue)");
            text.Append("{");
            text.Append("var articleIDControl = document.getElementById('" + base.ClientID + "_" + articleID.ClientID + "');");
            text.Append("var articleTitleControl = document.getElementById('" + base.ClientID + "_" + articleTitle.ClientID + "');");
            text.Append("var articleArray = returnValue.split('|');");
            text.Append("articleIDControl.value = articleArray[0];");
            text.Append("articleTitleControl.value = articleArray[1];");
            text.Append(GetPostBack());
            text.Append("}");
            text.Append("function ToggleSearch(enabled)");
            text.Append("{");
            text.Append("var btnSearchControl = document.getElementById('" + base.ClientID + "_" + dialogButton.ClientID + "');");
            text.Append("btnSearchControl.disabled=enabled;");
            text.Append("var dropdownControl = document.getElementById('" + base.ClientID + "_" + publishAtDropdown.ClientID + "');");
            text.Append("dropdownControl.disabled=!enabled;");
            text.Append("}");
            text.Append("</script>");

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "callbackscript", text.ToString(), false);

            articleID.Value = this.webpart.FilterValue1;

            dialogButton.InnerText = "...";

            string serverRelativeUrl;
            if (SPContext.Current.Web.ServerRelativeUrl == "/")
                serverRelativeUrl = "";
            else
                serverRelativeUrl = SPContext.Current.Web.ServerRelativeUrl;

            dialogButton.Attributes.Add("onclick", "javascript: OpenDialog('" + serverRelativeUrl + "/_layouts/NCNewssiteApplicationPages/ArticleSelectDialog.aspx');");
            dialogButton.Attributes.Add("type", "Button");
            userControlGroup.CssClass = "UserControlGroup";
            displayArticleTitle = new LiteralControl("tmp title");

            userControlGroup.Controls.Add(articleID);
            userControlGroup.Controls.Add(articleTitle);

            optManual = new RadioButton();
            optManual.Text = "Select article ";
            optManual.GroupName = "nc-contentquery-search";

            userControlGroup.Controls.Add(optManual);
            userControlGroup.Controls.Add(dialogButton);

            cell.Controls.Add(userControlGroup);

            row.Cells.Add(cell);
            return row;
        }
        /// <summary>
        /// This method adds a RadioButton or RadioButtonList controls and any other 
        /// content to the cell's Controls collection.
        /// </summary>
        /// <param name="cell"></param>
        /// <param name="rowState"></param>
        protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowState rowState)
        {
            RadioButtonList radioList = new RadioButtonList();
            radioList.RepeatDirection = RepeatDirection.Horizontal;
            radioList.DataBound += new EventHandler(radioList_DataBound);
            RadioButton radio = new RadioButton();

            radioList.Items.Add("True");
            radioList.Items.Add("False");


            // If the RadioButton is bound to a DataField, add
            // the OnDataBindingField method event handler to the
            // DataBinding event.
            if (DataField.Length != 0)
            {
                radio.DataBinding += new EventHandler(this.OnDataBindField);
            }


            // Because the RadioButtonField is a BoundField, it only
            // displays data. Therefore, unless the row is in edit mode,
            // the RadioButton is displayed as disabled.

            // If the row is in edit mode, enable the button.
            if ((rowState & DataControlRowState.Edit) != 0 || (rowState & DataControlRowState.Insert) != 0)
            {
                radio.Visible = false;
                radioList.Visible = true;
                cell.Controls.Add(radioList);
            }
            else
            {
                radio.Text = this.Text;
                radio.Enabled = false;
                radioList.Visible = false;
                cell.Controls.Add(radio);
            }
        }
Пример #50
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ScheduleBuilder"/> class.
        /// </summary>
        public ScheduleBuilderPopupContents()
        {
            // common
            _dpStartDateTime = new DateTimePicker();

            _tbDurationHours = new NumberBox();
            _tbDurationMinutes = new NumberBox();

            _radOneTime = new RadioButton();
            _radRecurring = new RadioButton();

            _radSpecificDates = new RadioButton();
            _radDaily = new RadioButton();
            _radWeekly = new RadioButton();
            _radMonthly = new RadioButton();

            // specific date
            _hfSpecificDateListValues = new HiddenField();

            _dpSpecificDate = new DatePicker();

            // daily
            _radDailyEveryXDays = new RadioButton();
            _tbDailyEveryXDays = new NumberBox();
            _radDailyEveryWeekday = new RadioButton();
            _radDailyEveryWeekendDay = new RadioButton();

            // weekly
            _tbWeeklyEveryX = new NumberBox();
            _cbWeeklySunday = new RockCheckBox();
            _cbWeeklyMonday = new RockCheckBox();
            _cbWeeklyTuesday = new RockCheckBox();
            _cbWeeklyWednesday = new RockCheckBox();
            _cbWeeklyThursday = new RockCheckBox();
            _cbWeeklyFriday = new RockCheckBox();
            _cbWeeklySaturday = new RockCheckBox();

            // monthly
            _radMonthlyDayX = new RadioButton();
            _tbMonthlyDayX = new NumberBox();
            _tbMonthlyXMonths = new NumberBox();
            _radMonthlyNth = new RadioButton();
            _ddlMonthlyNth = new RockDropDownList();
            _ddlMonthlyDayName = new RockDropDownList();

            // end date
            _radEndByNone = new RadioButton();
            _radEndByDate = new RadioButton();
            _dpEndBy = new DatePicker();
            _radEndByOccurrenceCount = new RadioButton();
            _tbEndByOccurrenceCount = new NumberBox();

            // exclusions
            _hfExclusionDateRangeListValues = new HiddenField();
            _dpExclusionDateRange = new DateRangePicker();
        }
Пример #51
0
		public void TextAlign_Invalid ()
		{
			RadioButton r = new RadioButton ();
			r.TextAlign = (TextAlign)Int32.MinValue;
		}