예제 #1
0
        private static void ComboLogic()
        {
            var targetQ2  = Q2.GetTarget();
            var targetQ3  = Q3.GetTarget();
            var targetQ4  = Q4.GetTarget();
            var PlayerPos = GameObjects.Player.Position;

            var inputQ2 = Q2.GetPrediction(targetQ2);
            var inputQ3 = Q3.GetPrediction(targetQ3);
            var inputQ4 = Q4.GetPrediction(targetQ4);

            if (mainMenu["Combo"].GetValue <MenuBool>("Q2use").Enabled&& Q.IsReady() && !E2.IsReady() && targetQ2.IsValidTarget() && inputQ2.Hitchance >= HitChance.VeryHigh)
            {
                Q2.Cast(inputQ2.CastPosition);
            }
            if (mainMenu["Combo"].GetValue <MenuBool>("Q4use").Enabled&& Q.IsReady() && targetQ4.IsValidTarget() && inputQ4.Hitchance >= HitChance.VeryHigh && E2.IsReady())
            {
                E2.Cast(inputQ4.CastPosition);
                Q4.Cast(inputQ4.CastPosition);
            }
            if (mainMenu["Combo"].GetValue <MenuBool>("Q3use").Enabled&& Q.IsReady() && targetQ3.IsValidTarget() && inputQ3.Hitchance >= HitChance.VeryHigh && E2.IsReady())
            {
                Q3.Cast(inputQ3.CastPosition);
                E2.Cast(PlayerPos);
            }
        }
예제 #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            Q4 q4 = db.Q4s.Find(id);

            db.Q4s.Remove(q4);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #3
0
 public ActionResult Edit([Bind(Include = "ID,Name")] Q4 q4)
 {
     if (ModelState.IsValid)
     {
         db.Entry(q4).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(q4));
 }
예제 #4
0
        public ActionResult Create([Bind(Include = "ID,Name")] Q4 q4)
        {
            if (ModelState.IsValid)
            {
                db.Q4s.Add(q4);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(q4));
        }
예제 #5
0
 public void Dispose()
 {
     TopBar.Dispose();
     LeftBar.Dispose();
     RightBar.Dispose();
     BottomBar.Dispose();
     Q1.Dispose();
     Q2.Dispose();
     Q3.Dispose();
     Q4.Dispose();
 }
예제 #6
0
 public void BringToFront()
 {
     TopBar.BringToFront();
     LeftBar.BringToFront();
     RightBar.BringToFront();
     BottomBar.BringToFront();
     Q1.BringToFront();
     Q2.BringToFront();
     Q3.BringToFront();
     Q4.BringToFront();
 }
    //changes which of the canvases is visable
    private void ChangeVisableCanvas()
    {
        //if Reading is the active canvas
        if (listno == 0)
        {
            Reading.GetComponent <Canvas>().enabled = true;
            Q1.GetComponent <Canvas>().enabled      = false;
            Q2.GetComponent <Canvas>().enabled      = false;
            Q3.GetComponent <Canvas>().enabled      = false;
            Q4.GetComponent <Canvas>().enabled      = false;
        }

        //if Q1 is the active canvas
        if (listno == 1)
        {
            Reading.GetComponent <Canvas>().enabled = false;
            Q1.GetComponent <Canvas>().enabled      = true;
            Q2.GetComponent <Canvas>().enabled      = false;
            Q3.GetComponent <Canvas>().enabled      = false;
            Q4.GetComponent <Canvas>().enabled      = false;
        }

        //if Q2 is the active canvas
        if (listno == 2)
        {
            Reading.GetComponent <Canvas>().enabled = false;
            Q1.GetComponent <Canvas>().enabled      = false;
            Q2.GetComponent <Canvas>().enabled      = true;
            Q3.GetComponent <Canvas>().enabled      = false;
            Q4.GetComponent <Canvas>().enabled      = false;
        }

        //if Q3 is the active canvas
        if (listno == 3)
        {
            Reading.GetComponent <Canvas>().enabled = false;
            Q1.GetComponent <Canvas>().enabled      = false;
            Q2.GetComponent <Canvas>().enabled      = false;
            Q3.GetComponent <Canvas>().enabled      = true;
            Q4.GetComponent <Canvas>().enabled      = false;
        }

        //if Q4 is the active canvas
        if (listno >= 4)
        {
            Reading.GetComponent <Canvas>().enabled = false;
            Q1.GetComponent <Canvas>().enabled      = false;
            Q2.GetComponent <Canvas>().enabled      = false;
            Q3.GetComponent <Canvas>().enabled      = false;
            Q4.GetComponent <Canvas>().enabled      = true;
        }
    }
예제 #8
0
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Q4 q4 = db.Q4s.Find(id);

            if (q4 == null)
            {
                return(HttpNotFound());
            }
            return(View(q4));
        }
예제 #9
0
        static void Main(string[] args)
        {
            //Q1 q1 = new Q1();
            //q1.Driver();

            //Q2 q2 = new Q2();
            //q2.Driver();

            //Q3 q3 = new Q3();
            //q3.Driver();

            Q4 q4 = new Q4();

            q4.Driver();
        }
예제 #10
0
        public void SetBounds(int Left, int Top, int Width, int Height, bool finish)
        {
            if (finish)
            {
                FLeft   = Left;
                FTop    = Top;
                FWidth  = Width;
                FHeight = Height;
                if (OnSetBounds != null)
                {
                    OnSetBounds(new Rectangle(Left, Top, Width, Height));
                }
            }
            TopBar.SetBounds(Left, Top, Width, 1);
            LeftBar.SetBounds(Left, Top, 1, Height);
            BottomBar.SetBounds(Left, Top + Height - 1, Width, 1);
            RightBar.SetBounds(Left + Width - 1, Top, 1, Height);
            int squarewidth = 8;

            if (Action == ResizeAction.Resize)
            {
                Q2.Visible = true;
                Q3.Visible = true;
                Q4.Visible = true;
            }
            else
            {
                Q2.Visible  = false;
                Q3.Visible  = false;
                Q4.Visible  = false;
                squarewidth = 16;
            }
            int squaremid = squarewidth / 2;

            Q1.SetBounds(Left - squaremid, Top - squaremid, squarewidth, squarewidth);
            Q2.SetBounds(Left + Width - squaremid, Top - squaremid, squarewidth, squarewidth);
            Q3.SetBounds(Left + Width - squaremid, Top + Height - squaremid, squarewidth, squarewidth);
            Q4.SetBounds(Left - squaremid, Top + Height - squaremid, squarewidth, squarewidth);
        }
예제 #11
0
파일: Q4Test.cs 프로젝트: cwloon96/LeetCode
        public void Test()
        {
            double result = new Q4().FindMedianSortedArrays(new[] { 1, 3 }, new[] { 2 });

            Assert.AreEqual(2, result);
        }
        protected bool SaveData()
        {
            StringBuilder columnList = new StringBuilder();
            SQLParamList  sqlParams  = new SQLParamList();

            if (QueryPropertyShortCode == GCCPropertyShortCode.GCC || (QueryPropertyShortCode == GCCPropertyShortCode.GAG && QueryGAGLocation == GLocation.None))
            {
                //User had to select location
                string propSel = fbkProperty.SelectedValue;
                if (propSel.Length > 3)
                {
                    //GAG
                    if (propSel.Substring(0, 2).Equals("13"))
                    {
                        columnList.AppendFormat(",[{0}]", fbkProperty.DBColumn);
                        sqlParams.Add("@" + fbkProperty.DBColumn, 13);
                    }
                }
                else
                {
                    fbkProperty.PrepareQuestionForDB(columnList, sqlParams);
                }
            }

            ddlDepartment.PrepareQuestionForDB(columnList, sqlParams);
            Q1.PrepareQuestionForDB(columnList, sqlParams);
            Q2.PrepareQuestionForDB(columnList, sqlParams);
            Q3.PrepareQuestionForDB(columnList, sqlParams);
            Q4.PrepareQuestionForDB(columnList, sqlParams);
            Q5.PrepareQuestionForDB(columnList, sqlParams);
            Q6.PrepareQuestionForDB(columnList, sqlParams);
            Q7.PrepareQuestionForDB(columnList, sqlParams);
            Q8.PrepareQuestionForDB(columnList, sqlParams);
            Q9.PrepareQuestionForDB(columnList, sqlParams);
            Q10.PrepareQuestionForDB(columnList, sqlParams);
            Q11.PrepareQuestionForDB(columnList, sqlParams);
            Q12.PrepareQuestionForDB(columnList, sqlParams);
            Q13.PrepareQuestionForDB(columnList, sqlParams);
            Q14.PrepareQuestionForDB(columnList, sqlParams);
            Q15.PrepareQuestionForDB(columnList, sqlParams);
            Q16.PrepareQuestionForDB(columnList, sqlParams);
            Q17.PrepareQuestionForDB(columnList, sqlParams);
            Q18.PrepareQuestionForDB(columnList, sqlParams);
            Q19.PrepareQuestionForDB(columnList, sqlParams);
            Q20.PrepareQuestionForDB(columnList, sqlParams);
            Q21.PrepareQuestionForDB(columnList, sqlParams);
            Q22.PrepareQuestionForDB(columnList, sqlParams);
            Q23.PrepareQuestionForDB(columnList, sqlParams);
            Q24.PrepareQuestionForDB(columnList, sqlParams);
            Q25.PrepareQuestionForDB(columnList, sqlParams);
            Q26.PrepareQuestionForDB(columnList, sqlParams);
            Q27.PrepareQuestionForDB(columnList, sqlParams);
            Q28.PrepareQuestionForDB(columnList, sqlParams);
            Q29A.PrepareQuestionForDB(columnList, sqlParams);
            Q29B.PrepareQuestionForDB(columnList, sqlParams);
            Q29C.PrepareQuestionForDB(columnList, sqlParams);
            Q30.PrepareQuestionForDB(columnList, sqlParams);
            radQ31_Hourly.PrepareQuestionForDB(columnList, sqlParams);
            radQ31_Salary.PrepareQuestionForDB(columnList, sqlParams);
            radQ32_1.PrepareQuestionForDB(columnList, sqlParams);
            radQ32_2.PrepareQuestionForDB(columnList, sqlParams);
            radQ32_3.PrepareQuestionForDB(columnList, sqlParams);
            radQ32_4.PrepareQuestionForDB(columnList, sqlParams);
            radQ32_5.PrepareQuestionForDB(columnList, sqlParams);
            Q33.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_1.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_2.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_3.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_4.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_5.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_6.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_7.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_8.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_9.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_10.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_11.PrepareQuestionForDB(columnList, sqlParams);
            chkQ34_12.PrepareQuestionForDB(columnList, sqlParams);

            if (radFFContinue.Checked)
            {
                CSR_Q1.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q2.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q3.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q4.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q5_1.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q5_2.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q5_3.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q5_4.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q6.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q7.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q8_1.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q8_2.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q8_3.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q8_4.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q8_5.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q8_6.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q8_7.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q8_8.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q8_9.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q8_OtherExplanation.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q9A.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q9B.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q9C.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q9D.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q9E.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q9F.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q9G.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q9H.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q10A.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q10B.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q10C.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q10D.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q10E.PrepareQuestionForDB(columnList, sqlParams);
                radCSR_Q11_1.PrepareQuestionForDB(columnList, sqlParams);
                radCSR_Q11_2.PrepareQuestionForDB(columnList, sqlParams);
                radCSR_Q11_3.PrepareQuestionForDB(columnList, sqlParams);
                radCSR_Q11_4.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q12.PrepareQuestionForDB(columnList, sqlParams);
                CSR_Q13.PrepareQuestionForDB(columnList, sqlParams);
            }

            columnList.Append(",[PropertyID],[DateEntered],[SurveyType]");
            sqlParams.Add("@PropertyID", Master.PropertyID)
            .Add("@DateEntered", DateTime.Now)
            .Add("@SurveyType", IsKioskSurvey ? "K" : "D");
            if (GAGLocation != GLocation.None)
            {
                columnList.Append(",[GAGLocation]");
                sqlParams.Add("@GAGLocation", GAGLocation.ToString());
            }

            columnList.Remove(0, 1);
            SQLDatabase sql   = new SQLDatabase();    sql.CommandTimeout = 120;
            int         rowID = sql.QueryAndReturnIdentity(String.Format("INSERT INTO [tblSurveySnapshot2017] ({0}) VALUES ({1});", columnList, columnList.ToString().Replace("[", "@").Replace("]", String.Empty)), sqlParams);

            if (!sql.HasError && rowID != -1)
            {
                Dictionary <string, int> wordCounts = SurveyTools.GetWordCount(Q33.Text, CSR_Q8_OtherExplanation.Text, CSR_Q13.Text);
                SurveyTools.SaveWordCounts(SharedClasses.SurveyType.Employee, rowID, wordCounts);
                return(true);
            }
            else
            {
                return(false);
            }
        }
        protected bool SaveData(out int rowID)
        {
            StringBuilder columnList = new StringBuilder();
            SQLParamList  sqlParams  = new SQLParamList();

            Q1.PrepareQuestionForDB(columnList, sqlParams);
            if (Session["CurrentUI"].ToString() == "fr-CA")
            {
                Q2_F.PrepareQuestionForDB(columnList, sqlParams);
            }
            else
            {
                Q2.PrepareQuestionForDB(columnList, sqlParams);
            }
            Q3.PrepareQuestionForDB(columnList, sqlParams);
            Q4.PrepareQuestionForDB(columnList, sqlParams);
            Q5Name.PrepareQuestionForDB(columnList, sqlParams);
            Q5Title.PrepareQuestionForDB(columnList, sqlParams);
            Q5Telephone.PrepareQuestionForDB(columnList, sqlParams);
            Q5Email.PrepareQuestionForDB(columnList, sqlParams);
            Q6Street.PrepareQuestionForDB(columnList, sqlParams);
            Q6City.PrepareQuestionForDB(columnList, sqlParams);
            Q6Province.PrepareQuestionForDB(columnList, sqlParams);
            Q6PostalCode.PrepareQuestionForDB(columnList, sqlParams);
            Q7.PrepareQuestionForDB(columnList, sqlParams);
            Q8.PrepareQuestionForDB(columnList, sqlParams);
            Q9A.PrepareQuestionForDB(columnList, sqlParams);
            Q9B.PrepareQuestionForDB(columnList, sqlParams);
            Q9C.PrepareQuestionForDB(columnList, sqlParams);
            Q9C_Explanation.PrepareQuestionForDB(columnList, sqlParams);
            Q10.PrepareQuestionForDB(columnList, sqlParams);
            Q11A_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11A_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            Q11B_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11B_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            Q11C_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11C_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            //Q11D_PastSupport.PrepareQuestionForDB( columnList, sqlParams );
            //Q11D_CurrentRequest.PrepareQuestionForDB( columnList, sqlParams );
            Q11E_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11E_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            Q11F_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11F_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            Q11G_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11G_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            Q11H_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11H_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            Q11I_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11I_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            Q11J_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11J_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            Q11K_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11K_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            Q11L_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11L_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);
            Q11M_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11M_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            //2017-11-14  Adding 3 new ontario locations
            Q11N_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11N_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            Q11O_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11O_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            Q11P_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11P_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            Q11Q_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11Q_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            Q11R_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11R_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            Q11S_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11S_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            Q11T_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11T_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            Q11U_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11U_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);


            Q11V_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11V_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            Q11W_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11W_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            Q11X_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11X_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);



            Q11Y_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11Y_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);

            Q11Z_PastSupport.PrepareQuestionForDB(columnList, sqlParams);
            Q11Z_CurrentRequest.PrepareQuestionForDB(columnList, sqlParams);



            Q12.PrepareQuestionForDB(columnList, sqlParams);
            Q13.PrepareQuestionForDB(columnList, sqlParams);
            Q14.PrepareQuestionForDB(columnList, sqlParams);

            columnList.Append(",[PropertyID],[DateEntered]");
            sqlParams.Add("@PropertyID", Master.PropertyID)
            .Add("@DateEntered", DateTime.Now);

            columnList.Remove(0, 1);
            SQLDatabase sql = new SQLDatabase();    sql.CommandTimeout = 120;

            rowID = sql.QueryAndReturnIdentity(String.Format("INSERT INTO [tblSurveyDonation] ({0}) VALUES ({1});", columnList, columnList.ToString().Replace("[", "@").Replace("]", String.Empty)), sqlParams);
            return(!sql.HasError && rowID != -1);
        }
예제 #14
0
 public Task <R4> HandleAsync(Q4 query, CancellationToken cancellationToken)
 {
     return(Task.FromResult(new R4()));
 }
예제 #15
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string visit = "V2";
            string user  = Convert.ToString(Session["User"]) + "@web";

            string appdt = txtnxtdt.Text + " " + txtnxttm.Text;
            string q9    = Q9.SelectedItem != null ? Q9.SelectedItem.Value : string.Empty;
            string q11   = Q11.SelectedItem != null ? Q11.SelectedItem.Value : string.Empty;
            string q14   = Q14.SelectedItem != null ? Q14.SelectedItem.Value : string.Empty;
            string q15   = Q15.SelectedItem != null ? Q15.SelectedItem.Value : string.Empty;

            DateTime DOV   = DateTime.ParseExact(txtq2dt.Text, "dd-MM-yyyy", CultureInfo.InvariantCulture);
            DateTime today = DateTime.ParseExact(RangeValidator2.MaximumValue, "dd-MM-yyyy", CultureInfo.InvariantCulture);

            if (txtq2dt.Text == "" || (DOV > today))
            {
                showalert("Enter correct Date of Visit!");
                txtq2dt.Focus();
            }

            else if (Q4.SelectedItem == null)
            {
                showalert("Select Any option");
                Q4.Focus();
            }
            else if (Q5.SelectedItem == null)
            {
                showalert("Select Any option");
                Q5.Focus();
            }
            else if (Q5.SelectedIndex == 1 && Q6.SelectedIndex == 0)
            {
                showalert("Cannot Select Yes if the child has never been hospitalized");
                Q6.Focus();
            }
            else if (Q6.SelectedItem == null)
            {
                showalert("Select Any option");
                Q6.Focus();
            }
            else if (Q7.SelectedItem == null)
            {
                showalert("Select Any option");
                Q7.Focus();
            }
            else if (Q8.SelectedItem == null)
            {
                showalert("Select Any option");
                Q8.Focus();
            }
            else if ((Q8.SelectedIndex == 0 || Q8.SelectedIndex == 1) && Q9.SelectedItem == null)
            {
                showalert("Select Any option");
                Q9.Focus();
            }
            else if (Q9.SelectedIndex == 2 && txtq9x.Text == "")
            {
                showalert("Please Specify other");
                txtq9x.Focus();
            }
            else if (Q10.SelectedItem == null)
            {
                showalert("Select Any option");
                Q10.Focus();
            }
            else if (Q10.SelectedIndex == 0 && Q11.SelectedItem == null)
            {
                showalert("Select Any option");
                Q11.Focus();
            }
            else if (Q10.SelectedIndex == 0 && txtq12dt.Text == "")
            {
                showalert("Enter Date of Blood Collection!");
                txtq12dt.Focus();
            }
            else if (Q10.SelectedIndex == 0 && txtq13t.Text == "")
            {
                showalert("Enter Time of collection!");
                txtq13t.Focus();
            }
            else if (Q10.SelectedIndex == 0 && Q14.SelectedItem == null)
            {
                showalert("Select Any option");
                Q14.Focus();
            }
            else if (Q10.SelectedIndex == 0 && Q15.SelectedItem == null)
            {
                showalert("Select Any option");
                Q15.Focus();
            }
            else if (Q10.SelectedIndex == 0 && (txtq16.Text == "" || txtq16.Text.Length < 9))
            {
                showalert("Enter correct sample number!");
                txtq16.Focus();
            }
            else if (txtnxtdt.Text == "")
            {
                showalert("Enter Next Appointement date");
                txtnxtdt.Focus();
            }
            else if (txtnxttm.Text == "")
            {
                showalert("Enter Appointement Time");
                txtnxttm.Focus();
            }
            else
            {
                try
                {
                    MySqlConnection con = new MySqlConnection(constr2);
                    con.Open();
                    MySqlCommand cmd = new MySqlCommand("insert into formsv2(studyid,dssid, childname, formtype, csv01, csv02, hb01, hb02, hb03,hb04, hb05, hb06, hb0688x, bl01, bl02, bl03, bl04, bl05, bl06, bl07, nextapp, user, formdate)" +
                                                        "values ('" + txtStudyID.Text.ToUpper() + "','" + txtDSSID.Text.ToUpper() + "','" + childname + "','" + visit + "','" + txtq1dt.Text + "','" + txtq2dt.Text + "','" + Q4.SelectedItem.Value + "', " +
                                                        "'" + Q5.SelectedItem.Value + "','" + Q6.SelectedItem.Value + "','" + Q7.SelectedItem.Value + "','" + Q8.SelectedItem.Value + "','" + q9 + "','" + txtq9x.Text + "','" + Q10.SelectedItem.Value + "', " +
                                                        "'" + q11 + "','" + txtq12dt.Text + "','" + txtq13t.Text + "','" + q14 + "','" + q15 + "','" + txtq16.Text + "', '" + appdt + "','" + user + "','" + DateTime.Now.ToString("dd-MM-yyyy hh:mm tt") + "' )", con);



                    //    "'" + Q11.SelectedItem.Value + "','" + txtq12dt.Text + "','" + txtq13t.Text + "','" + Q14.SelectedItem.Value + "','" + Q15.SelectedItem.Value + "','" + txtq16.Text.ToUpper() + "'", con);
                    //MySqlCommand cmd = new MySqlCommand("insert into formsv2(studyid,dssid, formtype, csv01, csv02, hb01, hb02, hb03,hb04, hb05, hb06, hb0688x, bl01, bl02, bl03, bl04, bl05, bl06, bl07, nextapp, user, formdate)" +
                    //    "values ('" + txtStudyID.Text.ToUpper() + "','" + txtDSSID.Text.ToUpper() + "','" + visit + "','" + txtq1dt.Text + "','" + txtq2dt.Text + "','" + Q4.SelectedItem.Value + "', " +
                    //    "'" + Q5.SelectedItem.Value + "','" + Q6.SelectedItem.Value + "','" + Q7.SelectedItem.Value + "','" + Q8.SelectedItem.Value + "','" + q9 + "','" + txtq9x.Text.ToUpper() + "','" + Q10.SelectedItem.Value + "', " +
                    //    "'" + q11 + "','" + txtq12dt.Text + "','" + txtq13t.Text + "','" + q14 + "','" + q15 + "','" + txtq16.Text + "', '" + appdt + "','" + user + "','" + DateTime.Now.ToString("dd/MM/yyyy hh:mm tt") + "')", con);
                    cmd.ExecuteNonQuery();
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "alerts", "javascript:alert('Submitted Successfully!');window.location.href='visit2.aspx';", true);
                    con.Close();
                }
                catch (Exception ex)
                {
                    showalert(ex.Message);
                }
            }
        }
예제 #16
0
 public Task <R4> HandleAsync(Q4 query)
 {
     return(Task.FromResult(new R4()));
 }