Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region test
            int intPartyID = Convert.ToInt32(Request.QueryString["code"]);
            string bagLoans = Request.QueryString["bagLoans"];
            string carryingCost = Request.QueryString["carryingCost"];
            if (intPartyID > 0)
            {
                ReportManager rptManager = new ReportManager();
                //_Party = new PartyManager.GetPartyByID(intPartyID);
                _Party = rptManager.GetPartyByID(intPartyID);

                //  txtCode.Text = _Party.PartyID;
                //txtserid.Text=_Party
                //txtpartycode.Text = _Party.PartyID.ToString();
                //txtCode.Text = _Party.PartyCode;
                String name = _Party.PartyName;
                String fName = _Party.FatherName;
                string partType = _Party.PartyType;
                String village = _Party.AreaVillageName;
                String po = _Party.AreaPOName;
                String cellNo = _Party.Cell;
                string district = rptManager.getdist(Convert.ToInt32(_Party.DistrictID)).DistrictName;
                string upazila = rptManager.getupzilla(Convert.ToInt32(_Party.UpazilaPSID)).UpazilaPSName;

                ReportDocument rptDoc = new ReportDocument();
                dsAgreementReport ds = new dsAgreementReport();
                DataTable dt = new DataTable();
                // dt.TableName = "Crystal Report Example";
                //// dt = getAllOrders(); //This function is located below this function
                // dt = getFakeDbOrders();

                // ds.Tables[0].Merge(dt);
                rptDoc.Load(Server.MapPath("../Delivery/rptDeliveryReport.rpt"));
                rptDoc.FileName = Server.MapPath("../Delivery/rptDeliveryReport.rpt");
                rptDoc.SetDataSource(ds);
                //report.SetParameterValue("@Userid", userid);
                rptDoc.SetParameterValue("CustomerCode", intPartyID);
                rptDoc.SetParameterValue("CustomerName", name);
                rptDoc.SetParameterValue("FatherName", fName);
                rptDoc.SetParameterValue("MobileNo", cellNo);
                rptDoc.SetParameterValue("village", village);
                rptDoc.SetParameterValue("PO", po);
                rptDoc.SetParameterValue("Bag Loans", bagLoans);
                rptDoc.SetParameterValue("Carrying Cost", carryingCost);
                rptDoc.SetParameterValue("District", district);
                rptDoc.SetParameterValue("Upazila", upazila);
                CrystalReportViewer1.ReportSource = rptDoc;
            }
            #endregion
        }
Ejemplo n.º 2
0
        private void LoadToAllControlValue(int intPartyID)
        {
            if (intPartyID > 0)
            {
                ReportManager rptManager = new ReportManager();
                //_Party = new PartyManager.GetPartyByID(intPartyID);
                _Party = rptManager.GetPartyByID(intPartyID);

              //  txtCode.Text = _Party.PartyID;
                txtCode.Text = _Party.PartyCode;
                txtpartycode.Text = _Party.PartyID.ToString();
                txtName.Text = _Party.PartyName;
                txtFather.Text = _Party.FatherName;
                txtPartyType.Text = _Party.PartyType;
                txtVillage.Text = _Party.AreaVillageName;
                txtPO.Text = _Party.AreaPOName;
                txtCellNo.Text = _Party.Cell;
                txtDistrict.Text = rptManager.getdist(Convert.ToInt32(_Party.DistrictID)).DistrictName;
                txtUpazilla.Text = rptManager.getupzilla(Convert.ToInt32(_Party.UpazilaPSID)).UpazilaPSName;

            }
        }
Ejemplo n.º 3
0
        private void LoadToAllControlValue(int intPartyID)
        {
            if (intPartyID > 0)
            {
                ReportManager rptManager = new ReportManager();
                //_Party = new PartyManager.GetPartyByID(intPartyID);
                _Party = rptManager.GetPartyByID(intPartyID);

                //  txtCode.Text = _Party.PartyID;
                //txtserid.Text=_Party
                txtpartycode.Text = _Party.PartyID.ToString();
                txtCode.Text = _Party.PartyCode;
                txtName.Text = _Party.PartyName;
                txtFather.Text = _Party.FatherName;
                txtPartyType.Text = _Party.PartyType;
                txtVillage.Text = _Party.AreaVillageName;
                txtPO.Text = _Party.AreaPOName;
                txtCellNo.Text = _Party.Cell;
                txtDistrict.Text = rptManager.getdist(Convert.ToInt32(_Party.DistrictID)).DistrictName;
                txtUpazilla.Text = rptManager.getupzilla(Convert.ToInt32(_Party.UpazilaPSID)).UpazilaPSName;

                string partyCode = txtCode.Text;

                if (partyCode.Contains("F") || partyCode.Contains("P"))
                {
                    txtBagloans.Enabled = true;
                    txtCarryingCost.Enabled = true;
                }
                else
                {
                    txtBagloans.Enabled = false;
                    txtCarryingCost.Enabled = false;
                }
            }
        }