コード例 #1
0
ファイル: FamilyGateway.cs プロジェクト: moshiur-cse/pgcbApp
        public int SaveAffectedLandPresentCropsAndProductionInformation(AffectedLandPresentCropsAndProductionInformation aData)
        {
            Query = @"INSERT INTO AffectedLandPresentCropsAndProductionInformation(BasicInformationOfAffectedPersonNid,JlNo,TotalLand,KharifOne,ProductionOne,KharifTwo,ProductionTwo,Robi,ProductionThree,TotalPriceOfTotalProduction) 
            VALUES('" + aData.BasicInformationOfAffectedPersonNid + "','" + aData.JlNo + "','" + aData.TotalLand + "','" + aData.KharifOne + "','" + aData.ProductionOne + "','" + aData.KharifTwo + "','" + aData.ProductionTwo + "','" + aData.Robi + "','" + aData.ProductionThree + "','" + aData.TotalPriceOfTotalProduction + "')";
            Connection.Open();
            Command.CommandText = Query;
            int isRowAffected = Command.ExecuteNonQuery();

            Connection.Close();
            return(isRowAffected);
        }
コード例 #2
0
ファイル: FamilyGateway.cs プロジェクト: moshiur-cse/pgcbApp
        public List <AffectedLandPresentCropsAndProductionInformation> GetAllAffectedLandPresentCropsAndProductionInformation(int qid)
        {
            List <AffectedLandPresentCropsAndProductionInformation> aList = new List <AffectedLandPresentCropsAndProductionInformation>();

            Query = @"SELECT * FROM AffectedLandPresentCropsAndProductionInformation WHERE BasicInformationOfAffectedPersonNid='" + qid + "'";


            Connection.Open();
            Command.CommandText = Query;
            Reader = Command.ExecuteReader();

            while (Reader.Read())
            {
                long   id            = Convert.ToInt64(Reader["BasicInformationOfAffectedPersonNid"]);
                string jlNo          = Reader["JlNo"].ToString();
                string totalLand     = Reader["TotalLand"].ToString();
                string kharifOne     = Reader["KharifOne"].ToString();
                string productionOne = Reader["ProductionOne"].ToString();
                string kharifTwo     = Reader["KharifTwo"].ToString();
                string productionTwo = Reader["TotalPriceOfTotalProduction"].ToString();

                string robi                        = Reader["Robi"].ToString();
                string productionThree             = Reader["ProductionThree"].ToString();
                string totalPriceOfTotalProduction = Reader["TotalPriceOfTotalProduction"].ToString();

                AffectedLandPresentCropsAndProductionInformation aData = new AffectedLandPresentCropsAndProductionInformation();

                aData.BasicInformationOfAffectedPersonNid = id;
                aData.JlNo          = jlNo;
                aData.TotalLand     = totalLand;
                aData.KharifOne     = kharifOne;
                aData.ProductionOne = productionOne;
                aData.KharifTwo     = kharifTwo;
                aData.ProductionTwo = productionTwo;

                aData.Robi                        = robi;
                aData.ProductionThree             = productionThree;
                aData.TotalPriceOfTotalProduction = totalPriceOfTotalProduction;
                aList.Add(aData);
            }
            Connection.Close();
            return(aList);
        }
コード例 #3
0
ファイル: FamilyManager.cs プロジェクト: moshiur-cse/pgcbApp
 public int SaveAffectedLandPresentCropsAndProductionInformation(AffectedLandPresentCropsAndProductionInformation aData)
 {
     return(aFamilyGateway.SaveAffectedLandPresentCropsAndProductionInformation(aData));
 }