Exemple #1
0
        public void SowTextUpdate(ProjectBAL projectBAL)
        {
            try
            {
                con = Connection.GetConnection();
                cmd = Connection.GetCommand("SowTextUpdate", con);
                con.Open();

                cmd.Parameters.AddWithValue("@ProjectId", projectBAL.ProjectId);
                cmd.Parameters.AddWithValue("@SowText", projectBAL.SowText);
                cmd.ExecuteNonQuery();

                con.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (con.State != ConnectionState.Closed)
                {
                    con.Close();
                }
            }
        }
        private void ShowHideFirstVisitVideo()
        {
            ProjectBAL projectBAL = new ProjectBAL();
            projectBAL.CompanyId = companyId;
            bool isProjectExist = projectBAL.IsAnyProjectExistForThisCompany();

            if (isProjectExist)
            {
                divFirstVisitVideo.Visible = false;
            }
            else
            {
                divFirstVisitVideo.Visible = true;
            }
        }
Exemple #3
0
        private void ShowHideFirstVisitVideo()
        {
            ProjectBAL projectBAL = new ProjectBAL();

            projectBAL.CompanyId = companyId;
            bool isProjectExist = projectBAL.IsAnyProjectExistForThisCompany();

            if (isProjectExist)
            {
                divFirstVisitVideo.Visible = false;
            }
            else
            {
                divFirstVisitVideo.Visible = true;
            }
        }
Exemple #4
0
        public DataTable ProjectSelect(ProjectBAL projectBAL)
        {
            con = Connection.GetConnection();
            cmd = Connection.GetCommand("ProjectSelect", con);
            cmd.Parameters.AddWithValue("@CompanyId", projectBAL.CompanyId);
            sda = new SqlDataAdapter(cmd);

            try
            {
                sda.Fill(dt);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(dt);
        }
Exemple #5
0
        public DataTable ProjectSelect(ProjectBAL projectBAL)
        {
            con = Connection.GetConnection();
            cmd = Connection.GetCommand("ProjectSelect", con);
            cmd.Parameters.AddWithValue("@CompanyId", projectBAL.CompanyId);
            sda = new SqlDataAdapter(cmd);

            try
            {
                sda.Fill(dt);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return dt;
        }
Exemple #6
0
        public void SowTextUpdate(ProjectBAL projectBAL)
        {
            try
            {
                con = Connection.GetConnection();
                cmd = Connection.GetCommand("SowTextUpdate", con);
                con.Open();

                cmd.Parameters.AddWithValue("@ProjectId", projectBAL.ProjectId);
                cmd.Parameters.AddWithValue("@SowText", projectBAL.SowText);
                cmd.ExecuteNonQuery();

                con.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (con.State != ConnectionState.Closed)
                    con.Close();
            }
        }