예제 #1
0
        internal DataTable BindDocumentType(VoucherPrintingModel objVPModel)
        {
            try
            {
                ClsCon.cmd             = new SqlCommand();
                ClsCon.cmd.CommandType = CommandType.StoredProcedure;
                ClsCon.cmd.CommandText = "SPVoucherPrinting";
                ClsCon.cmd.Parameters.AddWithValue("@Ind", objVPModel.Ind);

                con = ClsCon.SqlConn();
                ClsCon.cmd.Connection = con;
                dtVP      = new DataTable();
                ClsCon.da = new SqlDataAdapter(ClsCon.cmd);
                ClsCon.da.Fill(dtVP);
                dtVP.TableName = "success";
            }
            catch (Exception)
            {
                dtVP           = new DataTable();
                dtVP.TableName = "error";
                return(dtVP);
            }
            finally
            {
                con.Close();
                con.Dispose();
                ClsCon.da.Dispose();
                ClsCon.cmd.Dispose();
            }
            return(dtVP);
        }
        public DataTable BindDocumentType(VoucherPrintingModel objVPModel)
        {
            DataTable dtBindDocType = objVPDA.BindDocumentType(objVPModel);

            return(dtBindDocType);
        }