示例#1
0
        /// <summary>
        /// To Get Tenure Land
        /// </summary>
        /// <param name="TenureLandName"></param>
        /// <returns></returns>
        public TenureLandList GetTenureLand(string TenureLandName)
        {
            OracleConnection cnn = new OracleConnection(AppConfiguration.ConnectionString);
            OracleCommand    cmd;
            string           proc = "USP_MST_GET_LANDTENURE";

            cmd             = new OracleCommand(proc, cnn);
            cmd.CommandType = CommandType.StoredProcedure;

            if (TenureLandName.ToString() == "")
            {
                cmd.Parameters.Add("@LandTenureNameIN", DBNull.Value);
            }
            else
            {
                cmd.Parameters.Add("@LandTenureNameIN", TenureLandName.ToString());
            }
            cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
            cmd.Connection.Open();
            OracleDataReader dr            = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            TenureLandBO     objTenureLand = null;
            TenureLandList   TenureLand    = new TenureLandList();

            while (dr.Read())
            {
                objTenureLand = new TenureLandBO();
                objTenureLand.Lnd_TenureId = Convert.ToInt32(dr.GetValue(dr.GetOrdinal("LND_TENUREID")));
                objTenureLand.Lnd_Tenure   = dr.GetString(dr.GetOrdinal("LND_TENURE"));
                objTenureLand.IsDeleted    = dr.GetString(dr.GetOrdinal("IsDeleted"));
                TenureLand.Add(objTenureLand);
            }
            dr.Close();
            return(TenureLand);
        }
示例#2
0
 /// <summary>
 /// Bind data to ddlLandTenure drop down
 /// </summary>
 private void BindLandTenure()
 {
     objMasterBLL      = new MasterBLL();
     objTenureLandList = objMasterBLL.LoadTenureLand();
     if (objTenureLandList.Count > 0)
     {
         ddlLandTenure.DataSource     = objTenureLandList;
         ddlLandTenure.DataTextField  = "Lnd_Tenure";
         ddlLandTenure.DataValueField = "Lnd_TenureId";
         ddlLandTenure.DataBind();
     }
     ddlLandTenure.Items.Insert(0, "--Select--");
 }
示例#3
0
        /// <summary>
        /// get Data and set data to Labels
        /// </summary>
        private void BindLandType()
        {
            LandInfoBLL      objLandInfoBLL = new LandInfoBLL();
            PublicLandInfoBO objLandInfo    = objLandInfoBLL.GetLandInfo(Convert.ToInt32(Session["HH_ID"]));

            if (objLandInfo != null)
            {
                objMasterBLL = new MasterBLL();

                TenureLandList TenureLands = objMasterBLL.LoadTenureLand();
                foreach (TenureLandBO objTenureLand in TenureLands)
                {
                    if (objTenureLand.Lnd_TenureId == objLandInfo.LND_TENUREID)
                    {
                        lblLandType.Text = objTenureLand.Lnd_Tenure;
                        break;
                    }
                }
            }
            else
            {
                LandInfoPrivateBLL objLFPrivateBLL = new LandInfoPrivateBLL();
                PrivateLandInfoBO  objLandInfoPriv = objLFPrivateBLL.GetLandInfoPriv(Convert.ToInt32(Session["HH_ID"]));

                if (objLandInfoPriv != null)
                {
                    objMasterBLL = new MasterBLL();

                    TenureLandList TenureLands = objMasterBLL.LoadTenureLand();
                    foreach (TenureLandBO objTenureLand in TenureLands)
                    {
                        if (objTenureLand.Lnd_TenureId == objLandInfoPriv.Lnd_TENUREIDPriv)
                        {
                            lblLandType.Text = objTenureLand.Lnd_Tenure;
                            break;
                        }
                    }
                }
            }
        }