Exemplo n.º 1
0
        public void UpdateCaseStatus(string status, int caseId, string DocName)
        {
            _objSPNames = new SPNames();
            DataSet ds = new DataSet();

            try
            {
                SqlTransaction sqlTrans;
                SqlCommand     cmdPtabDownloadStatus;

                m_sConnectionString = ConfigurationManager.AppSettings["LitigationConnectionString"];
                using (SqlConnection cnnPtabCase = new SqlConnection(m_sConnectionString))
                {
                    cnnPtabCase.Open();


                    //changed the stored procedure name
                    using (cmdPtabDownloadStatus = new SqlCommand("usp_update_PTAB_Download_Status_test", cnnPtabCase))
                    {
                        cmdPtabDownloadStatus.CommandType = CommandType.StoredProcedure;

                        cmdPtabDownloadStatus.Parameters.AddWithValue("@caseId", caseId);
                        cmdPtabDownloadStatus.Parameters.AddWithValue("@docname", DocName);
                        cmdPtabDownloadStatus.ExecuteNonQuery();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        public void SaveFileName(string CaseNo, string FileName, string Type, string ExibitNo)
        {
            _objSPNames = new SPNames();
            try
            {
                SqlTransaction sqlTrans;
                SqlCommand     cmdPtabCaseDetails;

                m_sConnectionString = ConfigurationManager.AppSettings["LitigationConnectionString"];

                using (SqlConnection cnnUpdatePtabCase = new SqlConnection(m_sConnectionString))
                {
                    cnnUpdatePtabCase.Open();

                    using (sqlTrans = cnnUpdatePtabCase.BeginTransaction())
                    {
                        try
                        {
                            using (cmdPtabCaseDetails = new SqlCommand(_objSPNames.PTABFileNameSave, cnnUpdatePtabCase, sqlTrans))
                            {
                                cmdPtabCaseDetails.CommandType = CommandType.StoredProcedure;
                                cmdPtabCaseDetails.Parameters.AddWithValue("@pCaseNumber", CheckDBNull(CaseNo));
                                cmdPtabCaseDetails.Parameters.AddWithValue("@pFileName", CheckDBNull(FileName));
                                cmdPtabCaseDetails.Parameters.AddWithValue("@pType", CheckDBNull(Type));
                                cmdPtabCaseDetails.Parameters.AddWithValue("@pExibitNumber", CheckDBNull(ExibitNo));

                                cmdPtabCaseDetails.ExecuteNonQuery();

                                sqlTrans.Commit();
                            }
                        }
                        catch (Exception ex)
                        {
                            sqlTrans.Rollback();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                // InsertLog.WriteToFile("Error in connection to server. " + ex.Message);
                int linenum = new System.Diagnostics.StackTrace(ex, true).GetFrame(0).GetFileLineNumber();
                LogFile.WriteToFile("Error Line :" + linenum + "-" + ex.Message); // Log
            }
        }
Exemplo n.º 3
0
        public DataSet GetCaseNUmberforDownload(int Mode)
        {
            _objSPNames = new SPNames();
            DataSet ds = new DataSet();

            try
            {
                SqlTransaction sqlTrans;
                SqlCommand     cmdPtabCaseDetails;

                m_sConnectionString = ConfigurationManager.AppSettings["LitigationConnectionString"];
                using (SqlConnection cnnPtabCase = new SqlConnection(m_sConnectionString))
                {
                    cnnPtabCase.Open();

                    using (sqlTrans = cnnPtabCase.BeginTransaction())
                    {
                        try
                        {
                            string sp_name = ConfigurationManager.AppSettings["GetCaseDetailsProc"].ToString();;
                            using (cmdPtabCaseDetails = new SqlCommand(sp_name, cnnPtabCase, sqlTrans))
                            {
                                cmdPtabCaseDetails.CommandType = CommandType.StoredProcedure;
                                //cmdPtabCaseDetails.Parameters.AddWithValue("@Mode", Mode);

                                SqlDataAdapter sqdaa = new SqlDataAdapter(cmdPtabCaseDetails);

                                sqdaa.Fill(ds);
                            }
                        }
                        catch (Exception ex)
                        {
                            sqlTrans.Rollback();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(ds);
        }
Exemplo n.º 4
0
        public int CheckISDoc_Lock(string caseno, string caseID)
        {
            _objSPNames = new SPNames();
            int ds = 0;

            try
            {
                SqlTransaction sqlTrans;
                SqlCommand     cmdPtabCaseDetails;

                m_sConnectionString = ConfigurationManager.AppSettings["LitigationConnectionString"];
                using (SqlConnection cnnPtabCase = new SqlConnection(m_sConnectionString))
                {
                    cnnPtabCase.Open();

                    using (sqlTrans = cnnPtabCase.BeginTransaction())
                    {
                        try
                        {
                            using (cmdPtabCaseDetails = new SqlCommand("usp_ptab_CheckDoc_log", cnnPtabCase, sqlTrans))
                            {
                                cmdPtabCaseDetails.CommandType = CommandType.StoredProcedure;
                                cmdPtabCaseDetails.Parameters.AddWithValue("@Value", CheckDBNull(caseno));
                                cmdPtabCaseDetails.Parameters.AddWithValue("@Caseid", caseID);
                                ds = Convert.ToInt32(cmdPtabCaseDetails.ExecuteScalar());
                                sqlTrans.Commit();
                            }
                        }
                        catch (Exception)
                        {
                            sqlTrans.Rollback();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(ds);
        }