Esempio n. 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "<br>Plant=" + DropDownList1.SelectedValue + "<br>";
        for (int i = 0; i < Request.Form.Count; i++)
        {
            if (Request.Form.Keys[i].Contains("Check"))
            {
                Label1.Text = Label1.Text + "<br> added to Garden=" + Request.Form[i] + "<br>";
                try {
                    SqlDataSource objDS = new SqlDataSource();

                    objDS.ProviderName     = System.Configuration.ConfigurationManager.ConnectionStrings["GardenConnectionString"].ProviderName;
                    objDS.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["GardenConnectionString"].ConnectionString;

                    objDS.InsertCommand = "insert into T_Garden_Plant (GardenID_FK, PlantID_FK) values (?,?)";

                    objDS.InsertParameters.Add("GardenID_FK", Request.Form[i].ToString());
                    objDS.InsertParameters.Add("PlantID_FK", DropDownList1.SelectedValue);

                    objDS.Insert();
                }
                catch (Exception)
                {
                    ErrorLabel.Text = "Plant could not be added to Garden, possibly Plant is currrently in chosen Garden.";
                }
            }
        }

        CheckBoxList1.ClearSelection();
    }
Esempio n. 2
0
 protected void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     PrepareThemeAndModifierOptions(DropDownList1.SelectedValue);
     RadioButtonList1.ClearSelection();
     CheckBoxList1.ClearSelection();
     CleanUp(GetMapObj());
 }
        protected void Button1_Click(object sender, EventArgs e)
        {
            eventsource.InsertParameters["event_title"].DefaultValue      = TextBox7.Text.ToUpper().Trim();
            eventsource.InsertParameters["event_start_date"].DefaultValue = TextBox10.Text.ToUpper().Trim();
            eventsource.InsertParameters["event_end_date"].DefaultValue   = TextBox12.Text.ToUpper().Trim();
            eventsource.InsertParameters["event_end_time"].DefaultValue   = TextBox24.Text.ToUpper().Trim();
            eventsource.InsertParameters["event_start_time"].DefaultValue = TextBox11.Text.ToUpper().Trim();
            eventsource.InsertParameters["event_place"].DefaultValue      = CheckBoxList1.SelectedValue;
            eventsource.InsertParameters["event_capacity"].DefaultValue   = TextBox15.Text.Trim();
            eventsource.InsertParameters["multi_day_event"].DefaultValue  = RadioButtonList1.SelectedValue;
            eventsource.InsertParameters["audio_visual"].DefaultValue     = RadioButtonList2.SelectedValue;
            eventsource.InsertParameters["user_id"].DefaultValue          = TextBox25.Text.Trim();



            eventsource.Insert();
            TextBox7.Text  = string.Empty;
            TextBox10.Text = string.Empty;
            TextBox12.Text = string.Empty;
            TextBox24.Text = string.Empty;
            TextBox11.Text = string.Empty;
            TextBox5.Text  = string.Empty;
            TextBox25.Text = string.Empty;
            TextBox2.Text  = string.Empty;
            TextBox3.Text  = string.Empty;
            TextBox6.Text  = string.Empty;
            TextBox15.Text = string.Empty;
            TextBox8.Text  = string.Empty;
            CheckBoxList1.ClearSelection();
            RadioButtonList1.ClearSelection();
            RadioButtonList2.ClearSelection();
        }
 // Reset filters
 protected void Button6_Click(object sender, EventArgs e)
 {
     CheckBoxList1.ClearSelection();
     CheckBox1.Checked = false;
     CheckBoxList2.ClearSelection();
     ExecuteSearchAndSorting();
 }
    protected void btnCad_Click(object sender, EventArgs e)
    {
        if (!DropDownList1.SelectedIndex.Equals(0))
        {
            for (int i = 0; i < CheckBoxList1.Items.Count; i++)
            {
                if (CheckBoxList1.Items[i].Selected == true)
                {
                    if (!Roles.IsUserInRole(DropDownList1.SelectedItem.Value, CheckBoxList1.Items[i].Value))
                    {
                        Roles.AddUserToRole(DropDownList1.SelectedItem.Value, CheckBoxList1.Items[i].Value);
                    }
                }
                else
                {
                    if (Roles.IsUserInRole(DropDownList1.SelectedItem.Value, CheckBoxList1.Items[i].Value))
                    {
                        Roles.RemoveUserFromRole(DropDownList1.SelectedItem.Value, CheckBoxList1.Items[i].Value);
                    }
                }
            }
        }
        Response.Write("<script language='javascript'>alert('Alterado o perfil com sucesso!');</script>");

        DropDownList1.ClearSelection();
        CheckBoxList1.ClearSelection();
    }
Esempio n. 6
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     TextBox1.Text = "";
     TextBox2.Text = "";
     TextBox3.Text = "";
     Label1.Text   = "";
     CheckBoxList1.ClearSelection();
 }
Esempio n. 7
0
        protected void Submit_Click(object sender, EventArgs e)
        {
            String s     = Request.QueryString["boosh"];
            String q     = TextBox3.Text;
            int    count = 0;

            for (int a = 0; a < 5; a++)
            {
                if (CheckBoxList1.Items[a].Selected)
                {
                    count++;
                }
            }
            string txt2 = txtValues.Text;

            string[] newlist = txt2.Split(new Char[] { ';', '\\' }, StringSplitOptions.RemoveEmptyEntries);

            if (TextBox2.Text != "" && TextBox3.Text != "" && TextBox4.Text != "" && TextBox5.Text != "" && count != 0 && SympCheck(newlist) == true && AllCheck() == true)
            {
                DiseaseDataSource.UpdateParameters.Add("Name", TextBox2.Text);
                DiseaseDataSource.UpdateParameters.Add("Description", TextBox3.Text);
                DiseaseDataSource.UpdateParameters.Add("Prognosis", TextBox4.Text);
                DiseaseDataSource.UpdateParameters.Add("Phenotype_Id", DropDownList1.SelectedValue);
                // DiseaseDataSource.InsertParameters.Add("DiseaseId", TextBox2.Text);
                DiseaseDataSource.UpdateParameters.Add("DiseaseId", "");


                q = TextBox2.Text;
                q = TextBox3.Text;
                q = TextBox4.Text;



                DiseaseDataSource.UpdateCommandType = SqlDataSourceCommandType.Text;
                DiseaseDataSource.UpdateCommand     = "UPDATE [Diseases] SET [Name] = @Name, [Description] = @Description, [Prognosis] = @Prognosis, [Phenotype_Id] = @Phenotype_Id WHERE [Id] = " + s + "";
                DiseaseDataSource.Update();

                TextBox2.Text = "";
                TextBox3.Text = "";
                TextBox4.Text = "";
                TextBox5.Text = "";
                CheckBoxList1.ClearSelection();
            }
            else
            {
                if (SympCheck(newlist) == false)
                {
                    string myStringVariable = "Symptoms not found in Database";
                    txtValues.Text = "";
                    ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable + "');", true);
                }
            }
            Label1.Visible = true;
            System.Threading.Thread.Sleep(2000);
            Label1.Visible = false;
            Response.Redirect("Results.aspx");
        }
 private void refresh()
 {
     CheckBoxList1.ClearSelection();
     TextBox1.Text         = "";
     TextBox2.Text         = "";
     TextBox2.Visible      = false;
     Button2.Visible       = false;
     CheckBoxList2.Visible = false;
 }
Esempio n. 9
0
 private void Reset()
 {
     Text_Name.Text = "";
     ceil_new.Text  = "";
     ceil_old.Text  = "";
     //TextBox2.Text = "";
     CheckBoxList1.ClearSelection();
     CheckBoxList2.ClearSelection();
     DropDownList1.ClearSelection();
     resetSelect();
 }
    void fillcheckbox()
    {
        CheckBoxList1.ClearSelection();
        dm.Id_admin = decimal.Parse(DropDownList1.SelectedValue);
        DataTable dt = ac.SelectSecurity(dm);

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            CheckBoxList1.Items.FindByValue(dt.Rows[i]["security"].ToString().Trim()).Selected = true;
        }
        Label2.Visible = false;
    }
Esempio n. 11
0
        protected void Wizard1_CancelButtonClick1(object sender, EventArgs e)
        {
            TextBox4.Text = String.Empty;
            TextBox5.Text = String.Empty;
            TextBox6.Text = String.Empty;

            RadioButtonList1.ClearSelection();
            CheckBoxList1.ClearSelection();
            ListBox1.ClearSelection();
            Calendar1.SelectedDate = DateTime.Now;

            Result_Wizard.Text = "";
        }
Esempio n. 12
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     TextBox1.Text = "";
     TextBox2.Text = "";
     TextBox3.Text = "";
     TextBox4.Text = "";
     TextBox5.Text = "";
     TextBox6.Text = "";
     TextBox7.Text = "";
     TextBox8.Text = "";
     RadioButtonList2.ClearSelection();
     RadioButtonList3.ClearSelection();
     CheckBoxList1.ClearSelection();
 }
Esempio n. 13
0
    protected void submit_mech_btn_Click1(object sender, EventArgs e)
    {
        try
        {
            SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["RegistrationConnectionString"].ConnectionString);
            con.Open();
            DateTime   date        = DateTime.Now;
            string     updatequery = "Update ServiceRecords set Technician = @tech, NextServiceDate = @nextdate, DateUpdated = @dateupdate, NextServiceMilleage = @nextmile, RepairSummary = @repsumm where JobCardNo = '" + jobno_searchbx.Text + "'";
            SqlCommand com         = new SqlCommand(updatequery, con);

            com.Parameters.AddWithValue("@tech", ddl_techs.SelectedItem.ToString());
            com.Parameters.AddWithValue("@repsumm", repair_summtxtarea.Value);
            com.Parameters.AddWithValue("@nextmile", milleagetxtbx.Text);
            com.Parameters.AddWithValue("@nextdate", datetxtbx.Text);
            com.Parameters.AddWithValue("@dateupdate", date);

            /*List<String> CheckBoxListStr = new List<string>();
             * foreach (ListItem item in CheckBoxList1.Items)
             * {
             *  if (item.Selected && CheckBoxList1.SelectedItem != null)
             *  {
             *      com.Parameters.AddWithValue("@repsumm", CheckBoxList1.SelectedItem.Text);
             *  }
             * }*/

            com.ExecuteNonQuery();
            ShowMessage("Job card sucessfully updated");
            //Response.Redirect("MessageConfirnmationPage.aspx");

            con.Close();

            jobno_searchbx.Text   = string.Empty;
            vmake_txtbbx.Text     = string.Empty;
            vmodel_txtbx.Text     = string.Empty;
            vcolo_txtbx.Text      = string.Empty;
            regno_txtbx.Text      = string.Empty;
            servreq_txtarea.Value = string.Empty;
            com_txtarea.Value     = string.Empty;
            CheckBoxList1.ClearSelection();
            ddl_techs.ClearSelection();
            repair_summtxtarea.Value = string.Empty;
            recom_txtarea.Value      = string.Empty;
            datetxtbx.Text           = string.Empty;
            milleagetxtbx.Text       = string.Empty;
        }
        catch (Exception ex)
        {
            Response.Write("Error" + ex.Message);
        }
    }
Esempio n. 14
0
        //protected void StrongSymptomsButton_Click(object sender, EventArgs e)
        //{
        //SymptomsDataSource.InsertParameters.Add("Name", StrongSymptomName.Text);
        //SymptomsDataSource.InsertParameters.Add("Description", StrongSymptomDescription.Text);
        //SymptomsDataSource.InsertCommandType = SqlDataSourceCommandType.Text;
        //SymptomsDataSource.InsertCommand = "INSERT INTO Symptoms(Name, Description) VALUES(@Name, @Description)";

        //SymptomsDataSource.Insert();

        //}

        protected void SubmitButton0_Click(object sender, EventArgs e)
        {
            DiseaseNameText.BorderColor    = System.Drawing.Color.White;
            DiseaseDescription.BorderColor = System.Drawing.Color.White;
            DiseasePrognosis.BorderColor   = System.Drawing.Color.White;
            Aliases.BorderColor            = System.Drawing.Color.White;

            int count = 0;

            for (int a = 0; a < 5; a++)
            {
                if (CheckBoxList1.Items[a].Selected)
                {
                    count++;
                }
            }
            string txt2 = txtValues.Text;

            string[] newlist = txt2.Split(new Char[] { ';', '\\' }, StringSplitOptions.RemoveEmptyEntries);

            if (DiseaseNameText.Text != "" && DiseaseDescription.Text != "" && DiseasePrognosis.Text != "" && Aliases.Text != "" && count != 0 && SympCheck(newlist) == true && AllCheck() == true)
            {
                DiseaseDataSource.InsertParameters.Add("Name", DiseaseNameText.Text);
                DiseaseDataSource.InsertParameters.Add("Description", DiseaseDescription.Text);
                DiseaseDataSource.InsertParameters.Add("Prognosis", DiseasePrognosis.Text);
                DiseaseDataSource.InsertParameters.Add("Phenotype_Id", PathogenDropDown.SelectedValue);
                // DiseaseDataSource.InsertParameters.Add("DiseaseId", DiseaseNameText.Text);
                DiseaseDataSource.InsertParameters.Add("DiseaseId", "");


                DiseaseDataSource.InsertCommandType = SqlDataSourceCommandType.Text;
                DiseaseDataSource.InsertCommand     = "INSERT INTO Diseases(Name, Description, Prognosis, Phenotype_Id) VALUES(@Name, @Description, @Prognosis, @Phenotype_Id) SET @IdReturn=SCOPE_IDENTITY();";
                DiseaseDataSource.Insert();

                DiseaseNameText.Text    = "";
                DiseaseDescription.Text = "";
                DiseasePrognosis.Text   = "";
                Aliases.Text            = "";
                CheckBoxList1.ClearSelection();
            }
            else
            {
                if (SympCheck(newlist) == false)
                {
                    string myStringVariable = "Symptoms not found in Database";
                    txtValues.Text = "";
                    ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable + "');", true);
                }
            }
        }
Esempio n. 15
0
        protected void Apply_Click(object sender, EventArgs e)
        {
            Insert();

            CompanyTB.Text      = "";
            RoleTB.Text         = "";
            DescriptionTB.Text  = "";
            CompensationTB.Text = "";
            DeadlineTB.Text     = "";

            Select();
            InsertEB();

            CheckBoxList1.ClearSelection();
        }
 protected void Button2_Click(object sender, EventArgs e)
 {
     TextBox7.Text  = string.Empty;
     TextBox10.Text = string.Empty;
     TextBox12.Text = string.Empty;
     TextBox24.Text = string.Empty;
     TextBox11.Text = string.Empty;
     TextBox5.Text  = string.Empty;
     TextBox25.Text = string.Empty;
     TextBox2.Text  = string.Empty;
     TextBox3.Text  = string.Empty;
     TextBox6.Text  = string.Empty;
     TextBox15.Text = string.Empty;
     TextBox8.Text  = string.Empty;
     CheckBoxList1.ClearSelection();
     RadioButtonList1.ClearSelection();
     RadioButtonList2.ClearSelection();
 }
Esempio n. 17
0
    private void Reset()
    {
        //Desc_Box.Text = "";
        //DropDownList2.Items.Clear();
        Text_Name.Text = "";
        TextBox1.Text  = "";
        TextBox2.Text  = "";
        Text_I.Text    = "";
        //CheckBoxList1.DataValueField="";
        //CheckBoxList1.SelectedItem= "";
        CheckBoxList1.ClearSelection();
        // CheckBox1.Checked=false;
        //CheckBox2.Checked = false;
        start_date.Text = "";
        end_date.Text   = "";

        // Text_Position.Text = "";
        //Label_Messages0.Text = ""; //"Thank You Mr,MS " + Text_Name.Text + " Your Record Saved";
    }
Esempio n. 18
0
    public void clear()
    {
        txtWExpM.Text  = "";
        txtTExpYr.Text = "";
        ddlUniversity.SelectedIndex = 0;

        DDLSpecialization.SelectedIndex = 0;

        ddlUniversity.SelectedIndex     = 0;
        DDDLQualification.SelectedIndex = 0;
        txtInstName.Text = "";
        txtMarks.Text    = "";
        CheckBoxList1.ClearSelection();
        txtYrPassoutV1.Text = "";
        txtInstNameV1.Text  = "";
        txtMarksV1.Text     = "";
        DDDLQualificationV1.SelectedIndex = 0;
        ddlUniversityV1.SelectedIndex     = 0;
        DDLSpecializationV1.SelectedIndex = 0;
    }
Esempio n. 19
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     TextBox1.Enabled      = true;
     TextBox2.Enabled      = true;
     TextBox3.Enabled      = true;
     TextBox4.Enabled      = true;
     TextBox5.Enabled      = true;
     CheckBoxList2.Enabled = true;
     CheckBoxList3.Enabled = true;
     CheckBoxList4.Enabled = true;
     CheckBoxList1.Enabled = true;
     Label1.Text           = null;
     TextBox1.Text         = null;
     TextBox2.Text         = null;
     TextBox3.Text         = null;
     TextBox4.Text         = null;
     TextBox5.Text         = null;
     CheckBoxList2.ClearSelection();
     CheckBoxList3.ClearSelection();
     CheckBoxList4.ClearSelection();
     CheckBoxList1.ClearSelection();
 }
Esempio n. 20
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string nam, addr, eml, phn, gen, cndte, title, funct, roles, educ;
        string typ;

        nam  = TextBox4.Text;
        addr = TextBox2.Text;
        eml  = TextBox5.Text;
        phn  = TextBox6.Text;
        if (RadioButtonList2.SelectedItem.Text.Equals("Male"))
        {
            gen = "Male";
        }
        else if (RadioButtonList2.SelectedItem.Text.Equals("Female"))
        {
            gen = "Female";
        }
        else
        {
            gen = "Both";
        }
        if (RadioButtonList3.SelectedItem.Text.Equals("Fresher"))
        {
            cndte = "Fresher";
        }
        else
        {
            cndte = "Experienced";
        }
        title = TextBox1.Text;
        funct = TextBox3.Text;
        roles = TextBox7.Text;
        educ  = TextBox8.Text;
        if (CheckBoxList1.SelectedItem.Text.Equals("Full Time"))
        {
            typ = "Full Time";
        }
        else if (CheckBoxList1.SelectedItem.Text.Equals("Part Time"))
        {
            typ = "Part Time";
        }
        else
        {
            typ = "as per requirement";
        }
        try
        {
            using (MailMessage mm = new MailMessage("*****@*****.**", "*****@*****.**"))
            {
                mm.CC.Add("*****@*****.**");
                mm.Subject    = " Company Registering - Asking Students for Placement ";
                mm.Body       = " A Company Is Register On SIIIT. Asking Students For Placements.\nDetails are as follow :\n\n" + "Company Name :" + TextBox4.Text + "\nCompany Address :" + TextBox2.Text + "Phone No.:" + TextBox6.Text + "\nRequired Gender :" + gen + "\nCandidate Required :" + cndte + "\nJob Required :" + TextBox1.Text + "\nFuctional Area Of Job :" + TextBox3.Text + "\nRoles & Responsibilty :" + TextBox7.Text + "\nRequired Educational Details :" + TextBox8.Text + "\nJob Type :" + typ;
                mm.IsBodyHtml = false;
                SmtpClient smtp = new SmtpClient();
                smtp.Host      = "smtp.gmail.com";
                smtp.EnableSsl = true;
                NetworkCredential NetworkCred = new NetworkCredential("*****@*****.**", "shri2403");
                smtp.UseDefaultCredentials = true;
                smtp.Credentials           = NetworkCred;
                smtp.Port = 587;
                smtp.Send(mm);
            }
            using (MailMessage mm = new MailMessage("*****@*****.**", TextBox5.Text))
            {
                mm.Subject    = "Thanks for Registring In SIIT";
                mm.Body       = "\nSIIT GIVING THANKS FOR ASKING PLACEMENT AVAILABLE In  " + TextBox1.Text + ".\n We Will Contact You As Soon As Possible.\n\nThanks\nFrom : SIIT\nSHRI INSTITUTE OF INFORMATION TECHNOLOGY\nFor Any Queries :\nContact : +91 9650-777-567";
                mm.IsBodyHtml = false;
                SmtpClient smtp = new SmtpClient();
                smtp.Host      = "smtp.gmail.com";
                smtp.EnableSsl = true;
                NetworkCredential NetworkCred = new NetworkCredential("*****@*****.**", "shri2403");
                smtp.UseDefaultCredentials = true;
                smtp.Credentials           = NetworkCred;
                smtp.Port = 587;
                smtp.Send(mm);
            }
            SqlCommand cmd = new SqlCommand("insert into comp_place values('" + nam + "','" + addr + "','" + eml + "','" + phn + "','" + gen + "','" + cndte + "','" + title + "','" + funct + "','" + roles + "','" + educ + "','" + typ + "')", con);
            con.Open();
            cmd.ExecuteNonQuery();
            con.Close();
            Response.Write("<script>alert('Data Has Been Submitted! We Contact You As Soonn As Possible.');</script>");
            TextBox1.Text = "";
            TextBox2.Text = "";
            TextBox3.Text = "";
            TextBox4.Text = "";
            TextBox5.Text = "";
            TextBox6.Text = "";
            TextBox7.Text = "";
            TextBox8.Text = "";
            RadioButtonList2.ClearSelection();
            RadioButtonList3.ClearSelection();
            CheckBoxList1.ClearSelection();
        }
        catch (Exception)
        {
            Response.Write("<script>alert('Eror while submitting the data!');</script>");
        }
    }
Esempio n. 21
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            //            ID
//UserName
//Dept_Branch
//TerminalNo
//ClientCode
//ClientName
//ContactNo
//ContactType
//ConfirmationDate
//Segment
//GivenTo
            if (!string.IsNullOrEmpty(ClientNameLabel15.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(SegmentLabel8.Text.Trim()))
                {
                    if ((!string.IsNullOrEmpty(yday)) && string.IsNullOrEmpty(ReasonForPendingTextBox1.Text.Trim()))

                    {
                        MessageBox.Show("Please Enter Reason For Pending Confirmation..");
                    }
                    else
                    {
                        conn.Open();
                        cmd             = conn.CreateCommand();
                        cmd.CommandText = "insert into Confirmation(UserName,Dept_Branch,TerminalNo,ClientCode,ClientName,ContactNo,ContactType,ConfirmationDate,Segment,GivenTo,OtherRemark,ReasonForPending)values(@UserName,@Dept_Branch,@TerminalNo,@ClientCode,@ClientName,@ContactNo,@ContactType,@ConfirmationDate,@Segment,@GivenTo,@OtherRemark,@ReasonForPending)";
                        //@UserName,@Dept_Branch,@TerminalNo,@ClientCode,@ClientName,@ContactNo,@ContactType,@ConfirmationDate,@Segment,@GivenTo
                        cmd.Parameters.AddWithValue("@UserName", UserNameLabel13.Text.Trim());
                        cmd.Parameters.AddWithValue("@Dept_Branch", Dept_BranchLabel14.Text.Trim());
                        cmd.Parameters.AddWithValue("@TerminalNo", TerminalNoTextBox1.Text.Trim());
                        cmd.Parameters.AddWithValue("@ClientCode", ClientCodeTextBox2.Text.ToUpper().Trim());
                        cmd.Parameters.AddWithValue("@ClientName", ClientNameLabel15.Text.Trim());
                        if (ContactRadioButtonList1.SelectedItem.Text.Trim() == "Other")
                        {
                            cmd.Parameters.AddWithValue("@ContactNo", UnRegisteredTextBox3.Text.Trim());
                            cmd.Parameters.AddWithValue("@ContactType", "UnRegistered");
                        }
                        else
                        {
                            cmd.Parameters.AddWithValue("@ContactNo", ContactRadioButtonList1.SelectedItem.Text.Trim());
                            cmd.Parameters.AddWithValue("@ContactType", "Registered");
                        }

                        cmd.Parameters.AddWithValue("@ConfirmationDate", Convert.ToDateTime(ConfirmationDateTextBox4.Text + " " + HH_DropDownList1.SelectedValue + ":" + MM_DropDownList2.SelectedValue + " " + AM_PM_DropDownList3.SelectedValue));
                        //            cmd.Parameters.AddWithValue("@Segment", SegmentDropDownList4.SelectedValue);
                        cmd.Parameters.AddWithValue("@Segment", SegmentLabel8.Text.Trim());

                        if (ConfirmationToDropDownList5.SelectedItem.Text.Trim() == "Other")
                        {
                            cmd.Parameters.AddWithValue("@GivenTo", ConfirmationToTextBox5.Text.Trim());
                        }
                        else
                        {
                            cmd.Parameters.AddWithValue("@GivenTo", ConfirmationToDropDownList5.Text.Trim());
                        }

                        cmd.Parameters.AddWithValue("@OtherRemark", OtherRemarkTextBox1.Text.Trim());
                        cmd.Parameters.AddWithValue("@ReasonForPending", ReasonForPendingTextBox1.Text.Trim());
                        cmd.ExecuteNonQuery();
                        MessageBox.Show("Saved Successfully");
                        conn.Close();
                        GridView1.DataBind();
                        ReasonForPendingTextBox1.Text = "";
                        TerminalNoTextBox1.Text       = "";
                        ClientCodeTextBox2.Text       = "";
                        ClientNameLabel15.Text        = "";
                        ContactRadioButtonList1.ClearSelection();
                        CheckBoxList1.ClearSelection();
                        UnRegisteredTextBox3.Text   = "";
                        ConfirmationToTextBox5.Text = "";
                        ConfirmationToDropDownList5.SelectedIndex = 0;

                        OtherRemarkTextBox1.Text = "";

                        SegmentLabel8.Text = "";

                        /********/


                        DataTable dtOFL = new DataTable();
                        conn.Open();
                        cmd             = conn.CreateCommand();
                        cmd.CommandText = "select * from OFLReport where TradeDate='" + ConfirmationDateTextBox4.Text + "'";
                        dr = cmd.ExecuteReader();
                        if (dr.HasRows)
                        {
                            dtOFL.Load(dr);
                            dr.Close();
                        }

                        dr.Close();

                        foreach (DataRow DRW in dtOFL.Rows)
                        {
                            cmd             = conn.CreateCommand();
                            cmd.CommandText = "select * from Confirmation where TerminalNo='" + DRW["Terminal"].ToString().Trim() + "' and  Segment like '%" + DRW["Segment"].ToString().Trim() + "%' and  ClientCode='" + DRW["ClientCode"].ToString().Trim() + "' and  ConfirmationDate>='" + ConfirmationDateTextBox4.Text.Trim() + "' and ConfirmationDate<='" + Convert.ToDateTime(ConfirmationDateTextBox4.Text.Trim()).AddDays(1).ToString("dd-MMM-yyyy") + "' Order by ID desc";
                            dr = cmd.ExecuteReader();
                            if (dr.HasRows)
                            {
                                dr.Read();
                                string query = "update OFLReport set  ReasonForPending=@ReasonForPending, OtherRemark=@OtherRemark, UserName= @UserName,Dept_Branch=@Dept_Branch,CallTime=@CallTime,ContactNo=@ContactNo,ContactType=@ContactType,GivenTo=@GivenTo,  Matched='Confirmed' where  TradeDate='" + ConfirmationDateTextBox4.Text + "' and ClientCode= @ClientCode and Terminal= @Terminal and  Segment like '%" + DRW["Segment"].ToString().Trim() + "%' ";
                                cmd             = conn.CreateCommand();
                                cmd.CommandText = query;
                                cmd.Parameters.AddWithValue("@ReasonForPending", dr["ReasonForPending"].ToString().Trim());
                                cmd.Parameters.AddWithValue("@OtherRemark", dr["OtherRemark"].ToString().Trim());
                                cmd.Parameters.AddWithValue("@UserName", dr["UserName"].ToString().Trim());
                                cmd.Parameters.AddWithValue("@Dept_Branch", dr["Dept_Branch"].ToString().Trim());
                                cmd.Parameters.AddWithValue("@CallTime", dr["ConfirmationDate"].ToString().Trim());
                                cmd.Parameters.AddWithValue("@ContactNo", dr["ContactNo"].ToString().Trim());

                                cmd.Parameters.AddWithValue("@ContactType", dr["ContactType"].ToString().Trim());
                                cmd.Parameters.AddWithValue("@GivenTo", dr["GivenTo"].ToString().Trim());
                                cmd.Parameters.AddWithValue("@ClientCode", DRW["ClientCode"].ToString().Trim());
                                cmd.Parameters.AddWithValue("@Terminal", DRW["Terminal"].ToString().Trim());

                                //    cmd.Parameters.AddWithValue("@Segment", DRW["Segment"].ToString().Trim());

                                dr.Close();


                                cmd.ExecuteNonQuery();
                            }
                            dr.Close();
                        }
                        conn.Close();

                        /*********/
                    }
                }
                else
                {
                    MessageBox.Show("Select Segment..!");
                }
            }
            else
            {
                MessageBox.Show("Client Name Blank Not Allowed");
            }
        }