Exemplo n.º 1
0
    public int DeleteSegment01(Segment01ListUI segment01ListUI)
    {
        int result = 0;

        result = segment01LsitDAL.DeleteSegment01(segment01ListUI);
        return(result);
    }
Exemplo n.º 2
0
    public DataTable GetSegment01ListBySearchParameters(Segment01ListUI segment01ListUI)
    {
        DataTable dtb = new DataTable();

        dtb = segment01LsitDAL.GetSegment01ListBySearchParameters(segment01ListUI);
        return(dtb);
    }
Exemplo n.º 3
0
    public DataTable GetSegment01ListById(Segment01ListUI segment01ListUI)
    {
        DataTable dtb = new DataTable();

        dtb = segment01LsitDAL.GetSegment01ListById(segment01ListUI);
        return(dtb);
    }
Exemplo n.º 4
0
    private void BindSegmentListBySearchParameters(Segment01ListUI segmentListUI)
    {
        try
        {
            DataTable dtb = segment01ListBAL.GetSegment01ListBySearchParameters(segment01ListUI);

            if (dtb.Rows.Count > 0 && dtb != null)
            {
                gvData.DataSource = dtb;
                gvData.DataBind();
                divError.Visible = false;
            }
            else
            {
                divError.Visible = true;
                lblError.Text    = Resources.GlobalResource.msgNoRecordFound;
                gvData.Visible   = false;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "BindSegmentListBySearchParameters()";
            logExcpUIobj.ResourceName     = "System_Settings_Segment01List.CS";
            logExcpUIobj.RecordId         = "All";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_SegmentList : BindSegmentListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
Exemplo n.º 5
0
    public DataTable GetSegment01ListById(Segment01ListUI segment01ListUI)
    {
        DataSet   ds   = new DataSet();
        DataTable dtbl = new DataTable();

        //Boolean result = false;
        try
        {
            using (SqlConnection SupportCon = new SqlConnection(connectionString))
            {
                SqlCommand sqlCmd = new SqlCommand("SP_Segment01_SelectById", SupportCon);
                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.CommandTimeout = commandTimeout;

                sqlCmd.Parameters.Add("@tbl_Segment01Id", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_Segment01Id"].Value = segment01ListUI.Tbl_Segment01Id;

                using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd))
                {
                    adapter.Fill(ds);
                }
            }
            if (ds.Tables.Count > 0)
            {
                dtbl = ds.Tables[0];
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "getSegment01ListById()";
            logExcpUIobj.ResourceName     = "Segment01ListDAL.CS";
            logExcpUIobj.RecordId         = segment01ListUI.Tbl_Segment01Id;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Segment01ListDAL : getSegment01ListById] An error occured in the processing of Record Id : " + segment01ListUI.Tbl_Segment01Id + ". Details : [" + exp.ToString() + "]");
        }
        finally
        {
            ds.Dispose();
        }

        return(dtbl);
    }
Exemplo n.º 6
0
    public int DeleteSegment01(Segment01ListUI segment01ListUI)
    {
        int result = 0;

        try
        {
            using (SqlConnection SupportCon = new SqlConnection(connectionString))
            {
                SupportCon.Open();
                SqlCommand sqlCmd = new SqlCommand("SP_Segment01_Delete", SupportCon);

                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.CommandTimeout = commandTimeout;

                sqlCmd.Parameters.Add("@tbl_Segment01Id", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_Segment01Id"].Value = segment01ListUI.Tbl_Segment01Id;

                result = sqlCmd.ExecuteNonQuery();

                sqlCmd.Dispose();
                SupportCon.Close();
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "DeleteSegment01()";
            logExcpUIobj.ResourceName     = "Segment01ListDAL.CS";
            logExcpUIobj.RecordId         = segment01ListUI.Tbl_Segment01Id;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Segment01ListDAL : DeleteSegment01] An error occured in the processing of Record Id : " + segment01ListUI.Tbl_Segment01Id + ". Details : [" + exp.ToString() + "]");
        }

        return(result);
    }