protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                foreach (RepeaterItem item in Repeater1.Items)
                {
                    RadioButton rbSelect       = (RadioButton)item.FindControl("RadioButton1");
                    Label       lbplumbingType = (Label)item.FindControl("Label1");
                    if (lbplumbingType != null)
                    {
                        string param_plumbingType = lbplumbingType.Text.Trim();
                        if (rbSelect != null && rbSelect.Checked == true)
                        {
                            string sql_command = " EXEC [dbo].[set_Project_03_09_Plumbing] "
                                                 + " '" + param_projid + "','" + param_plumbingType + "','" + userID + "' ";
                            ClassConfig.GetDataSQL(sql_command);
                        }
                    }
                }

                //Update Spec
                ClassConfig.UpdateSpec(param_projid, "", userID);

                //Update Status
                ClassConfig.UpdateStatus(param_projid, "On Progress", userID);

                //Redirect
                Response.Redirect("CreateProject_03_10?id=" + param_projid);
            }
            catch (Exception)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$('#alertError').show();", true);
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                foreach (RepeaterItem item in Repeater1.Items)
                {
                    TextBox tbNumRoom    = (TextBox)item.FindControl("TextBox1");
                    Label   lbtoiletType = (Label)item.FindControl("Label1");
                    if (lbtoiletType != null)
                    {
                        string param_toiletType = lbtoiletType.Text.Trim();
                        if (tbNumRoom != null)
                        {
                            string param_numRoom = tbNumRoom.Text.Trim();
                            string sql_command   = " EXEC [dbo].[set_Project_03_07_Toilet] "
                                                   + " '" + param_projid + "','" + param_toiletType + "','" + param_numRoom + "','" + userID + "' ";
                            ClassConfig.GetDataSQL(sql_command);
                        }
                    }
                }

                //Update Spec
                ClassConfig.UpdateSpec(param_projid, "", userID);

                //Update Status
                ClassConfig.UpdateStatus(param_projid, "On Progress", userID);

                //Redirect
                Response.Redirect("CreateProject_03_08?id=" + param_projid);
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$('#alertError').show();", true);
            }
        }
Example #3
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                foreach (RepeaterItem item in Repeater1.Items)
                {
                    //RadioButtonList rbSelect = (RadioButtonList)item.FindControl("RadioButtonList1");

                    Label       lbRoofStyle = (Label)item.FindControl("Label1");
                    Label       lbRoofType  = (Label)item.FindControl("Label2");
                    RadioButton rbSelect    = (RadioButton)item.FindControl("RadioButton1");

                    if (lbRoofStyle != null && lbRoofType != null)
                    {
                        string param_roofStyle = lbRoofStyle.Text.Trim();
                        string param_roofType  = lbRoofType.Text.Trim();

                        if (rbSelect != null && rbSelect.Checked == true)
                        {
                            string sql_command = " EXEC [dbo].[set_Project_03_04_Roof] "
                                                 + " '" + param_projid + "','" + param_roofStyle + "','" + param_roofType + "','" + userID + "','All'";
                            ClassConfig.GetDataSQL(sql_command);
                        }

                        //    foreach (ListItem li in rbSelect.Items)
                        //    {
                        //if (rbSelect != null && li.Selected == true)
                        //{
                        //string param_roofType = li.Value.ToString().Trim();
                        //string sql_command = " EXEC [dbo].[set_Project_03_04_Roof] "
                        //         + " '" + param_projid + "','" + param_roofStyle + "','" + param_roofType + "','" + userID + "'";
                        //ClassConfig.GetDataSQL(sql_command);
                        //}
                    }
                }

                //Update Spec
                ClassConfig.UpdateSpec(param_projid, "", userID);

                //Update Status
                ClassConfig.UpdateStatus(param_projid, "On Progress", userID);

                //Redirect
                Response.Redirect("CreateProject_03_05?id=" + param_projid);
            }
            catch (Exception)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$('#alertError').show();", true);
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                foreach (RepeaterItem item in Repeater1.Items)
                {
                    RadioButton rbSelect     = (RadioButton)item.FindControl("RadioButton1");
                    Label       lbindoorType = (Label)item.FindControl("Label2");
                    if (lbindoorType != null)
                    {
                        string param_indoorType = lbindoorType.Text.Trim();
                        if (rbSelect != null && rbSelect.Checked == true)
                        {
                            string sql_command = " EXEC [dbo].[set_Project_03_10_Ceiling] "
                                                 + " '" + param_projid + "','INDOOR','" + param_indoorType + "','" + getMM3() + "','" + userID + "' ";
                            ClassConfig.GetDataSQL(sql_command);
                        }
                    }
                }

                foreach (RepeaterItem item in Repeater2.Items)
                {
                    RadioButton rbSelect      = (RadioButton)item.FindControl("RadioButton2");
                    Label       lboutdoorType = (Label)item.FindControl("Label4");
                    if (lboutdoorType != null)
                    {
                        string param_outdoorType = lboutdoorType.Text.Trim();
                        if (rbSelect != null && rbSelect.Checked == true)
                        {
                            string sql_command = " EXEC [dbo].[set_Project_03_10_Ceiling] "
                                                 + " '" + param_projid + "','OUTDOOR','" + param_outdoorType + "','" + (double.Parse(getMM3(), CultureInfo.InvariantCulture) * 0.45).ToString() + "','" + userID + "' ";
                            ClassConfig.GetDataSQL(sql_command);
                        }
                    }
                }

                //Update Spec
                ClassConfig.UpdateSpec(param_projid, "", userID);

                //Update Status
                ClassConfig.UpdateStatus(param_projid, "On Progress", userID);

                //Redirect
                Response.Redirect("CreateProject_03_11?id=" + param_projid);
            }
            catch (Exception)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$('#alertError').show();", true);
            }
        }