Exemplo n.º 1
0
        public Tz888.Model.LoanscontactsTab GetLoanscontactsTabByLoansInfoId(int LoansInfoId)
        {
            string           sql       = "select * from loanscontactsTab where loansInfoID=@loansinfoid";
            DataSet          set       = DbHelperSQL.Query(sql, new SqlParameter("@LoansInfoId", LoansInfoId));
            LoanscontactsTab loansinfo = null;

            try
            {
                foreach (DataRow row in set.Tables[0].Rows)
                {
                    Tz888.SQLServerDAL.loansInfoTab loantabl = new loansInfoTab();
                    loansinfo                = new LoanscontactsTab();
                    loansinfo.ContactsID     = Convert.ToInt32(row["ContactsID"]);
                    loansinfo.LoansInfoID    = loantabl.GetLoansInfoTabByLoansInfoId(Convert.ToInt32(row["LoansInfoID"]));
                    loansinfo.EnterpriseName = row["EnterpriseName"].ToString();
                    loansinfo.ContactsName   = row["ContactsName"].ToString();
                    loansinfo.Telephone      = row["Telephone"].ToString();
                    loansinfo.Moblie         = row["Moblie"].ToString();
                    loansinfo.Mail           = row["Mail"].ToString();
                    loansinfo.Address        = row["Address"].ToString();
                    loansinfo.Loginname      = row["Loginname"].ToString();
                }
            }
            catch (Exception)
            {
                throw;
            }

            return(loansinfo);
        }
Exemplo n.º 2
0
        public Tz888.Model.LoansInfo GetLoansInfoByLoansInfoId(int LoansInfoId)
        {
            string    sql       = "select * from loansInfo where loansInfoID=@LoansInfoId";
            DataSet   set       = DbHelperSQL.Query(sql, new SqlParameter("LoansInfoId", LoansInfoId));
            LoansInfo loansinfo = null;

            try
            {
                foreach (DataRow row in set.Tables[0].Rows)
                {
                    Tz888.SQLServerDAL.loansInfoTab loantabl = new loansInfoTab();
                    loansinfo               = new LoansInfo();
                    loansinfo.LoanID        = Convert.ToInt32(row["LoanID"]);
                    loansinfo.LoansInfoID   = loantabl.GetLoansInfoTabByLoansInfoId(Convert.ToInt32(row["LoansInfoID"]));
                    loansinfo.ValidityID    = Convert.ToInt32(row["ValidityID"].ToString());
                    loansinfo.CountryID     = row["CountryID"].ToString();
                    loansinfo.ProvinceID    = row["ProvinceID"].ToString();
                    loansinfo.CityID        = row["CityID"].ToString();
                    loansinfo.CountyID      = row["CountyID"].ToString();
                    loansinfo.Amount        = Convert.ToInt32(row["Amount"]);
                    loansinfo.Deadline      = Convert.ToInt32(row["Deadline"]);
                    loansinfo.Reimbursement = Convert.ToInt32(row["Reimbursement"]);
                    loansinfo.Guarantee     = Convert.ToInt32(row["Guarantee"]);
                    loansinfo.BorrowingUse  = row["BorrowingUse"].ToString();
                    loansinfo.Title         = row["Title"].ToString();
                    loansinfo.Keywords      = row["Keywords"].ToString();
                    loansinfo.Description   = row["Description"].ToString();
                    loansinfo.Reason        = row["Reason"].ToString();
                }
            }
            catch (Exception)
            {
            }

            return(loansinfo);
        }