Esempio n. 1
0
    private void GetAllPurchaseCeneters()
    {
        Pobl = new PurchaseCenter(ComObj);

        string qrySelect = "select pcm.PcId,pcm.PurchaseCenterName as PurchaseCenterName,pcm.CommodityId,cm.CommodityName,pcm.DistrictId,dm.DistrictName as DistrictName,pcm.MarkSeasId,msm.MarkSeaon as MarketingSeason,pcm.cropyear as CropYear,pcm.Address as Address,pcm.Phone as Phone,pcm.PC_CategoryID,pcc.PC_Category as Category,pcm.Block as BlockTehsil,pcm.NodalOff as NodalOfficer from PurchaseCenterMaster pcm,DistrictMaster dm,CommodityMaster cm,MarketingSeasonMaster msm ,PurchaseCentreCategory pcc where cm.CommodityId=pcm.CommodityId and dm.DistrictCode=pcm.DistrictId and pcm.MarkSeasId=msm.MarkSeasId and pcc.PC_CategoryID=pcm.PC_CategoryID order by pcm.cropyear desc";

        DataSet ds = Pobl.selectAny(qrySelect);

        if (ds == null)
        {
        }
        else
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                fillGrid(ds);
                ViewState["dsPurchase"] = ds;
            }
        }
    }
Esempio n. 2
0
    private void GetPurchaseCenetersByDistrictCropYearMarketSeason()
    {
        Pobl = new PurchaseCenter(ComObj);

        string qrySelect = "select pcm.PcId,pcm.PurchaseCenterName as PurchaseCenterName,pcm.CommodityId,cm.CommodityName,pcm.DistrictId,dm.DistrictName as DistrictName,pcm.MarkSeasId,msm.MarkSeaon as MarketingSeason,pcm.cropyear as CropYear,pcm.Address as Address,pcm.Phone as Phone,pcm.PC_CategoryID,pcc.PC_Category as Category,pcm.Block as BlockTehsil,pcm.NodalOff as NodalOfficer from PurchaseCenterMaster pcm,DistrictMaster dm,CommodityMaster cm,MarketingSeasonMaster msm ,PurchaseCentreCategory pcc where cm.CommodityId=pcm.CommodityId and dm.DistrictCode=pcm.DistrictId and pcm.MarkSeasId=msm.MarkSeasId and pcc.PC_CategoryID=pcm.PC_CategoryID and pcm.DistrictId='" + ddl_District_Fetch.SelectedValue.ToString() + "' and pcm.MarkSeasId='" + ddl_MarketSeaon_Fetch.SelectedValue.ToString() + "' and pcm.cropyear='" + ddl_CropYear_Fetch.SelectedItem.Text.ToString() + "'";

        DataSet ds = Pobl.selectAny(qrySelect);

        if (ds == null)
        {
        }
        else
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                fillGridFetch(ds);
                ViewState["dsPurchaseFetch"] = ds;
            }
        }
    }
    private void getPurchaseCenter(string distid, string mid, string cropyear)
    {
        PcObj = new PurchaseCenter(ComObj);
        string  str = "SELECT * FROM PurchaseCenterMaster,MarketingSeasonMaster where PurchaseCenterMaster.DistrictId = '" + distid + "'  and  PurchaseCenterMaster.MarkSeasId = '" + mid + "' and cropyear ='" + cropyear + "' and MarketingSeasonMaster.MarkSeasId = PurchaseCenterMaster.MarkSeasId order by PurchaseCenterName ";
        DataSet ds  = PcObj.selectAny(str);

        if (ds == null)
        {
        }
        else
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                DDL_PC.DataSource     = ds.Tables[0];
                DDL_PC.DataTextField  = "PurchaseCenterName";
                DDL_PC.DataValueField = "PcId";
                DDL_PC.DataBind();
            }
        }
    }