protected void btnUpdate_Click(object sender, EventArgs e)
        {
            foreach (GridViewRow row in GVTeam.Rows)
            {
                if (row.RowType == DataControlRowType.DataRow)
                {
                    CheckBox chkRow = (row.Cells[0].FindControl("chkRow") as CheckBox);
                    if (chkRow.Checked)
                    {
                        string       ComplaintID = row.Cells[1].Text;
                        string       TicketNo    = row.Cells[2].Text;
                        DropDownList ddl         = (DropDownList)GVTeam.Rows[row.RowIndex].FindControl("DropDownList1");
                        string       TeamID      = ddl.SelectedValue.ToString();
                        string       TeamName    = ddl.SelectedItem.ToString();

                        DropDownList dd2 = (DropDownList)GVTeam.Rows[row.RowIndex].FindControl("DropDownList2");

                        string PriorityID     = dd2.SelectedValue.ToString();
                        int    DeptID         = Convert.ToInt32(Session["DepartmentID"]);
                        int    userid         = Convert.ToInt32(Session["UserID"]);
                        string Remarks        = "Assigning Complain: " + TicketNo + " To " + TeamName + " with " + PriorityID + " priority by " + Session["Name"] + " of " + DeptID;
                        int    AssignedDeptID = 0;
                        //string Remarks = "test";
                        dynamic dt_GetAssignedDeptId = objBSS.GetComplainDetailByComplainID(Convert.ToInt32(ComplaintID));
                        if (dt_GetAssignedDeptId.Rows.Count > 0)
                        {
                            AssignedDeptID = Convert.ToInt32(dt_GetAssignedDeptId.Rows[0]["AssignedDeptID"]);
                        }
                        //objBSS.AssignedComplainsToTeam(ComplaintID, TeamID, PriorityID, Remarks, DeptID, Session["Name"].ToString(), userid);
                        //objBSS.AssignedComplainsToTeam(Convert.ToInt32(ComplaintID), Convert.ToInt32(TeamID), Convert.ToInt32(PriorityID), Remarks, DeptID.ToString(), Session["Name"].ToString(), userid);
                        //objBSS.AssignedComplainsToTeam(Convert.ToInt32(ComplaintID), Convert.ToInt32(TeamID), Convert.ToInt32(PriorityID), Remarks, "1", Session["Name"].ToString(), userid);
                        if (!(TeamID.Equals("-1") || PriorityID.Equals("-1")))
                        {
                            objBSS.AssignedComplainsToTeam(Convert.ToInt32(ComplaintID), Convert.ToInt32(TeamID), Convert.ToInt32(PriorityID), Remarks, AssignedDeptID, Session["Name"].ToString(), userid);
                        }

                        else
                        {
                            lblStatus.Text    = "Please select Team and Priority";
                            lblStatus.Visible = true;
                        }

                        //string country = (row.Cells[2].FindControl("lblCountry") as Label).Text;
                    }
                }
            }
            Response.Redirect("~\\ComplainManagement\\OMTeamEscalation.aspx");
        }