Ejemplo n.º 1
0
 protected void grid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     var value = "ObjectId".Query();
     if (value.None())
     {
         Response.Redirect("~/Depot/Home");
         return;
     }
     var objId = value.GlobalId();
     var obj = DataContext.DepotObject.Single(o => o.Id == objId);
     if (obj.Fixed)
     {
         var source = DataContext.DepotInX.Where(o => (o.AvailableAmount > 0) && o.ObjectId == obj.Id).ToList().Select(o => new Placed { Id = o.Id, Ordinal = o.Ordinal, Fixed = true, Place = o.Place, Code = o.Code }).OrderBy(o => o.Ordinal).ToList();
         grid.DataSource = source;
     }
     else
     {
         var source = DataContext.DepotInX.Where(o => (o.AvailableAmount > 0) && o.ObjectId == obj.Id).OrderByDescending(o => o.AvailableAmount).ToList().Select(o => new Placed { Id = o.Id, Ordinal = 0, Fixed = false, Place = o.Place, Code = o.Code }).ToList();
         for (var i = 0; i < source.Count; i++)
         {
             source[i].Ordinal = i + 1;
         }
         grid.DataSource = source;
     }
 }
Ejemplo n.º 2
0
 protected void grdInventory_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (!e.IsFromDetailTable)
     {
         grdInventory.DataSource = CarInventoryViewManager.LoadAllActive().ToList();
     }
 }
 protected void radGridReview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     radGridReview.DataSource = SQLData.B_BDOCUMETARYCOLLECTION_GetByAmendment(txtCode.Text.Trim(),
             comboDraweeCusNo.SelectedValue, txtDraweeAddr.Text.Trim(),
             comboDrawerCusNo.Text, txtDrawerAddr.Text.Trim(),
             "UNA", UserId.ToString());
 }
        protected void radGridReview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("ReperenceNo");
            dt.Columns.Add("CustomerAccount");
            dt.Columns.Add("AmtLCY");
            dt.Columns.Add("AmtFCY");
            dt.Columns.Add("Status");
            dt.Columns.Add("LCCode");

            DataRow dr = dt.NewRow();
            dr["ReperenceNo"] = "TT/09161/078911";
            dr["CustomerAccount"] = "Phan Van Han";
            dr["AmtLCY"] = "17,791,0000";
            dr["AmtFCY"] = "1,000.00";
            dr["Status"] = "UNA";
            dr["LCCode"] = "1";
            dt.Rows.Add(dr);

            DataRow dr1 = dt.NewRow();
            dr1["ReperenceNo"] = "TT/09161/078912";
            dr1["CustomerAccount"] = "Pham Ngoc Thach";
            dr1["AmtLCY"] = "35,582,0000";
            dr1["AmtFCY"] = "2,000.00";
            dr1["Status"] = "UNA";
            dr1["LCCode"] = "2";
            dt.Rows.Add(dr1);

            radGridReview.DataSource = dt;
        }
Ejemplo n.º 5
0
 protected void RadGridAllChanges_DetailTableDataBind(object source, GridNeedDataSourceEventArgs e)
 {
     DataClasses1DataContext dbContext = new DataClasses1DataContext();
     try
     {
         RadGrid sender = source as RadGrid;
         Panel item = sender.Parent as Panel;
         Label lblReferenceId = item.FindControl("lblReferenceId") as Label;
         Label lblTableName = item.FindControl("lblTableName") as Label;
         DataTable t = new DataTable();
         if (lblReferenceId.Text != string.Empty || lblTableName.Text != string.Empty)
         {
             var tableColumns = dbContext.ChangeLogColumNames.SingleOrDefault(q => q.TableName == lblTableName.Text);
             string thisSelect = "";
             if (tableColumns != null)
             {
                 string idName = tableColumns.IdColumnName;
                 foreach (var col in tableColumns.ColumnNames.Split(';'))
                 {
                     if (thisSelect == string.Empty)
                     {
                         thisSelect = "[" + col + "]";
                     }
                     else
                     {
                         thisSelect += ",[" + col + "]";
                     }
                 }
                 dbContext.Connection.Close();
                 string myQuery = "";
                 if (thisSelect != string.Empty && idName != string.Empty && lblTableName.Text != string.Empty)
                 {
                     myQuery = "select " + thisSelect + " from [" + lblTableName.Text + "] where " + idName + " ='" + lblReferenceId.Text + "'";
                     using (SqlConnection c = new SqlConnection(dbContext.Connection.ConnectionString))
                     {
                         c.Open();
                         using (SqlDataAdapter a = new SqlDataAdapter(myQuery, c))
                         {
                             a.Fill(t);
                         }
                     }
                     sender.DataSource = t;
                 }
             }
             else
             {
                 setEmptyDataSet(((RadGrid)sender));
             }
         }
         else
         {
             setEmptyDataSet(((RadGrid)sender));
         }
     }
     catch (Exception ex)
     {
         dbContext.WriteLogItem("Fehler beim generieren des ChangeLogs Details. " + ex.Message, LogTypes.ERROR);
         dbContext.SubmitChanges();
     }
 }
 protected void grdRegisteredEvents_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (!e.IsFromDetailTable)
     {
         grdRegisteredEvents.DataSource = ConferenceEventsViewManager.LoadByUserId(UserId).ToList();
     }
 }
 protected void radGridReview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (!IsPostBack)
     {
         if (lstType != null && lstType.ToLower().Equals("4appr"))
         {
             var query = (from EX in entContext.B_ExportLCPayments
                          join BE in entContext.BEXPORT_DOCUMENTPROCESSINGs on EX.LCCode equals BE.PaymentId
                          join AD in entContext.BAdvisingAndNegotiationLCs on BE.LCCode equals AD.NormalLCCode
                          where EX.Status == "UNA"
                          select new { EX, AD });
             var lst = new List<BAdvisingAndNegotiationLC>();
             foreach (var item in query)
             {
                 lst.Add(new BAdvisingAndNegotiationLC
                 {
                     Id=item.EX.Id,
                     NormalLCCode=item.EX.LCCode,
                     Amount=item.AD.Amount,
                     ApplicantNo=item.AD.ApplicantNo,
                     Currency=item.AD.Currency,
                     ApplicantName=item.AD.ApplicantName,
                     Status=item.EX.Status
                 });
             }
             var source = CreateDataset(lst);
             radGridReview.DataSource = source;
         }
     }
 }
 protected void rgIndustries_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     using (var hrsgEntities = new HRSG_DatabaseEntities())
     {
         rgIndustries.DataSource = hrsgEntities.Industries.Where(a => a.Active).ToList();
     }
 }
Ejemplo n.º 9
0
 protected void radGridReview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (String.IsNullOrEmpty(lstType))
         radGridReview.DataSource = bd.Teller.TellerForeignExchangeList(this.TabId, null);
     else
         radGridReview.DataSource = bd.Teller.TellerForeignExchangeList(this.TabId, bd.TransactionStatus.UNA);
 }
 protected void radGridReview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (tbLCNo.Text != "" || rcbApplicantID.SelectedValue != "")
     {
         radGridReview.DataSource = DataProvider.KhanhND.B_BNORMAILLC_Search(tbLCNo.Text, rcbApplicantID.SelectedValue);
     }
 }
 protected void grdStatistics_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (!e.IsFromDetailTable)
     {
         grdStatistics.DataSource = PaperStatisticsViewManager.LoadAll();
     }
 }
        //CouponTitle_NeedDataSource where we can bind the based ont he values of today fromdate and member name
        protected void CouponTitle_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            if (FromDateTimePicker.SelectedDate == null && ToDateTimePicker.SelectedDate == null && FirstnameIDtxtbox.Text != string.Empty)
            {
                DataTable dt = new DataTable();
                objr.Membername = FirstnameIDtxtbox.Text.ToString();
                dt = objr.GetreportDetailsusingmembername();
                gvmember.DataSource = dt; ;
            }
            else if (FromDateTimePicker.SelectedDate != null && ToDateTimePicker.SelectedDate != null && FirstnameIDtxtbox.Text == string.Empty)
            {
                DataTable dt = new DataTable();

                objr.FDate = FromDateTimePicker.SelectedDate.Value;
                objr.Todate = ToDateTimePicker.SelectedDate.Value;
                objr.Membername = FirstnameIDtxtbox.Text.ToString();
                dt = objr.GetDonationDetailsusingDate();
                gvmember.DataSource = dt;
            }
            else
            {
                DataTable dt = new DataTable();

                objr.FDate = FromDateTimePicker.SelectedDate.Value;
                objr.Todate = ToDateTimePicker.SelectedDate.Value;
                objr.Membername = FirstnameIDtxtbox.Text.ToString();
                objr.Membername = FirstnameIDtxtbox.Text.ToString();
                dt = objr.GetreportDetailsusingmembernamewithdate();
                gvmember.DataSource = dt;

            }
        }
        protected void radGridReview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            if (TabId != 229)
            {
                radGridReview.DataSource = SQLData.B_BEXPORT_DOCUMETARYCOLLECTION_GetbyStatus(ScreenType.ToString("G"), UserId.ToString());
            }
            else
            {

                DataSet datasource = new DataSet();//Tab1
                DataTable tbl1 = new DataTable();
                tbl1.Columns.Add("DocCollectCode");
                tbl1.Columns.Add("CollectionType");
                tbl1.Columns.Add("Currency");
                tbl1.Columns.Add("Amount");
                tbl1.Columns.Add("Status");
                var lst = _entities.BEXPORT_DOCUMETARYCOLLECTION.Where(x => x.Amend_Status == "UNA" && (x.ActiveRecordFlag == null ||x.ActiveRecordFlag == YesNo.YES)).ToList();
                foreach (var item in lst)
                {
                    if (!String.IsNullOrEmpty(item.AmendNo))
                    {
                        tbl1.Rows.Add(item.AmendNo, item.CollectionType,item.Currency,item.Amount,item.Amend_Status);
                    }
                }
                datasource.Tables.Add(tbl1);
                radGridReview.DataSource = datasource;
            }
        }
        protected void grdSavingAccInterestList_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            var data = SavingAccountDAO.GetInteresAccountById(RefIdToReview);
            var total = data.AsEnumerable().Sum(r => r.Field<decimal?>("InterestAmt") ?? 0);
            VWlblTotalInAmt.Text = String.Format(CultureInfo.InvariantCulture,
                                 "{0:N}", total);
            VWlblPrincipal.Text = String.Format(CultureInfo.InvariantCulture,
                              "{0:N}", Convert.ToDecimal(VWlblOrgPrincipal.Text) + total);

            if (CurrencyCode == "VND")
            {
                WDnumAcmountLcy.Value =(double?)(total + PrincipalValue);
                WDlblNewCustBal.Text = string.Format("- {0}",(total + PrincipalValue).ToString()) ;
                WDlblAmtPaidToCust.Text = (total + PrincipalValue).ToString();
                WDnumAcmountFcy.Value = null;
            }
            else
            {
                WDnumAcmountLcy.Value = null;
                WDnumAcmountFcy.Value = (double?)(total + PrincipalValue);
                WDlblNewCustBal.Text = string.Format("- {0}",(total + PrincipalValue).ToString()) ;
                WDlblAmtPaidToCust.Text = (total + PrincipalValue).ToString();
            }
            grdSavingAccInterestList.DataSource = data;
        }
 protected void radGridReview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (string.IsNullOrEmpty(lstType))
         radGridReview.DataSource = BankProject.DataProvider.Teller.CashWithrawalForBuyingTCList(null, txtCustomerId.Text, txtCustomerName.Text);
     else
         radGridReview.DataSource = BankProject.DataProvider.Teller.CashWithrawalForBuyingTCList(bd.TransactionStatus.UNA, txtCustomerId.Text, txtCustomerName.Text);
 }
Ejemplo n.º 16
0
 protected void grdLocation_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (!e.IsFromDetailTable)
     {
         grdLocation.DataSource = LocationManager.LoadAll().ToList();
     }
 }
        protected void radGridReview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("ReperenceNo");
            dt.Columns.Add("CustomerAccount");
            dt.Columns.Add("AmtLCY");
            dt.Columns.Add("AmtFCY");
            dt.Columns.Add("Status");
            dt.Columns.Add("LCCode");

            DataRow dr = dt.NewRow();
            dr["ReperenceNo"] = "TT/09161/078911";
            dr["CustomerAccount"] = "BANK OF SHANGHAI";
            dr["AmtLCY"] = "2,000,0000";
            dr["AmtFCY"] = "100.00";
            dr["Status"] = "UNA";
            dr["LCCode"] = "1";
            dt.Rows.Add(dr);

            DataRow dr1 = dt.NewRow();
            dr1["ReperenceNo"] = "TT/09161/078912";
            dr1["CustomerAccount"] = "CITI BANK NEWYORK";
            dr1["AmtLCY"] = "4,000,0000";
            dr1["AmtFCY"] = "200.00";
            dr1["Status"] = "UNA";
            dr1["LCCode"] = "2";
            dt.Rows.Add(dr1);

            radGridReview.DataSource = dt;
        }
Ejemplo n.º 18
0
 protected void PopulateGroupDetail(object sender, GridNeedDataSourceEventArgs e)
 {
     if (_groupViewModel == null)
         throw new Exception(string.Format("The RoleId:'{0}' does not exist or the currently logged on user is not allowed to see it", RoleId));
     
     grdDetail.DataSource = new List<GroupViewModel> { _groupViewModel };
     
 }
Ejemplo n.º 19
0
        protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            var db = new UrbanDataContext();
            var manager = new UrbanDataManager(db);

            RadGrid1.DataSource = (from u in db.User
                                   select u).ToList();
        }
        //gvdonation_NeedDataSource event is apply getdonationdetails to gvmember grid
        protected void gvdonation_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            DataTable dt = new DataTable();

                dt = objd.getdonationdetails();

            gvdonation.DataSource = dt;
        }
 protected void radGridReview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (IsPostBack)
     {
         radGridReview.DataSource = Database.BOPENACCOUNT_EnquiryTransaction(rcbAccountType.SelectedValue, rcbTransactionType.SelectedValue, txtRefID.Text, rcbCurrency.SelectedValue, rcbCustomerType.SelectedValue, tbCustomerID.Text,
                                                                                          tbGBFullName.Text, tbCustomerAccount.Text, txtFrom.Value, txtTo.Value, txtDate.SelectedDate);
     }
 }
Ejemplo n.º 22
0
 protected void g1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     List<dynamic> list = new List<dynamic>();
     list.Add(new { 名称 = "小班", 入学时间 = string.Format("{0}年09月", __Year), 毕业时间 = string.Format("{0}年07月", __Year + 3) });
     list.Add(new { 名称 = "中班", 入学时间 = string.Format("{0}年09月", __Year - 1), 毕业时间 = string.Format("{0}年07月", __Year + 2) });
     list.Add(new { 名称 = "大班", 入学时间 = string.Format("{0}年09月", __Year - 2), 毕业时间 = string.Format("{0}年07月", __Year + 1) });
     g1.DataSource = list;
 }
 protected void RadGrid1_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (IsPostBack)
     {
         RadGridView.DataSource = TriTT.B_CHEQUEISSUE_Enquiry_Cheque(tbChequeRef.Text, tbWorkingAcct.Text, rcbChequeType.SelectedValue,
                  rdpIssuedDate.SelectedDate, tbChequeNo.Text.Length == 0 ? 0 : tbChequeNo.Value.Value);
     }
 }
 protected void RadGrid_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (IsPostBack)
     {
         RadGrid.DataSource = TriTT_Credit.B_CUSTOMER_LIMIT_ENQUIRY(rcbLimitTYpe.SelectedValue,rcbGlobalLimit.SelectedValue, rcbProductLimitID.SelectedValue, tbFullName.Text, tbCustomerID.Text, rcbCollateralType.SelectedValue
                 , rcbCollateral.SelectedValue, rcbCurrency.SelectedValue, tbFromIntLimitAmt.Value.HasValue ? tbFromIntLimitAmt.Value.Value : 0
                 , tbToIntLimitAmt.Value.HasValue ? tbToIntLimitAmt.Value.Value : 0);
     }
 }
 protected void radGridReview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (IsPostBack)
     {
         radGridReview.DataSource = BankProject.DataProvider.Database.BOPENACCOUNT_Search(txtAccountCode.Text, ckLocked.Checked, rcbCustomerType.SelectedValue, tbCustomerID.Text,
                                                                                          tbGBFullName.Text, tbDocID.Text, rcbcategory.SelectedValue, rcbCurrency.SelectedValue, rcbProductLine.SelectedValue);
     } else
     radGridReview.DataSource = BankProject.DataProvider.Database.BOPENACCOUNT_Search("NOTdata", false, "NOTdata", "NOTdata", "NOTdata", "NOTdata", "NOTdata","", "NOTdata");
 }
 protected void RadGrid1_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (IsPostBack)
     {
         RadGrid.DataSource = TriTT.B_OPEN_LOANWORK_ACCT_Enquiry_Customer(tbAcctRef.Text, tbCustomerID.Text, tbFullName.Text, rcbCurrency.SelectedValue,
                rcbProductLine.SelectedValue, rcbCategory.SelectedValue, tbDocId.Text);
     } else
     RadGrid.DataSource = TriTT.B_OPEN_LOANWORK_ACCT_Enquiry_Customer("!", "!", "", "", "", "", "");
 }
 protected void RadGrid1_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (IsPostBack)
     {
         RadGridView.DataSource = TriTT.B_CASHREPAYMENT_Enquiry(tbID.Text, tbCustomerAcct.Text, rcbCurrency.SelectedValue, tbCustomerID.Text,
                tbCustomerName.Text, tbLegalID.Text, tbFromDepositedAmt.Value.HasValue ? tbFromDepositedAmt.Value.Value : 0,
                tbTODepositedAmt.Value.HasValue ? tbTODepositedAmt.Value.Value : 0);
     }
 }
 protected void DataPreview_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (IsPostBack)
     {
         RadGridDataPreview.DataSource = TriTT.CHEQUE_STOP_Enquiry(tbDocID.Text, tbWorkingAcct.Text, tbChequeNo.Value.HasValue ? tbChequeNo.Value.Value : 0,
             tbCustomerID.Text, tbCustomerName.Text, rdpActiveDate.SelectedDate.HasValue ? rdpActiveDate.SelectedDate : null, rcbChequeType.SelectedValue,
             rcbStopReason.SelectedValue);
     }
 }
Ejemplo n.º 29
0
    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        ObjLogin cust = (ObjLogin)Session["objLogin"];

        int typeFilter = Convert.ToInt32(cbFilterType.SelectedValue);
        int promotionId = int.Parse(ddlPromotion.SelectedValue);

        RadGrid1.DataSource = FRepo.FilterInboxSmsWithPromo(typeFilter, txtFilterValue.Text.Trim(), cust.Phone, promotionId);// FRepo.GetInboxSMS(cust.Phone);
    }
 protected void RadGrid1_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     if (IsPostBack)
     {
         RadGridView.DataSource = Database.BCOLLECTCHARGESFROMACCOUNT_Enquiry(rcbCollectionType.SelectedValue, tbID.Text, rcbAccountType.SelectedValue
                 , tbAccountID.Text, tbCustomerID.Text, tbCustomerName.Text, tbLegalID.Text, tbFromAmt.Value.HasValue ? tbFromAmt.Value.Value : 0,
                 tbToAmt.Value.HasValue ? tbToAmt.Value.Value : 0);
     }
 }
Ejemplo n.º 31
0
 protected void CacheGrid_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     LoadData();
 }
        protected void Rad_invoce_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            if (!IsPostBack)
            {
                rad_invoce.DataSource = new List <InvoiceBriefInfo>();
                return;
            }
            if (RDP_StartTime.SelectedDate != null && RDP_EndTime.SelectedDate != null)
            {
                var    filialeId = new Guid(RCB_FilialeList.SelectedValue);
                string invoiceNo = string.Empty;
                if (!string.IsNullOrEmpty(tbx_keyword.Text.Trim()))
                {
                    invoiceNo = tbx_keyword.Text.Trim();
                }

                var pageSize  = rad_invoce.PageSize;
                var pageIndex = rad_invoce.CurrentPageIndex + 1;
                int recordCount;

                var    kindType = Convert.ToByte(RcbKindType.SelectedValue);
                var    flag     = kindType == (Byte)InvoiceKindType.Electron;
                string msg;
                InvoiceStatisticsInfo = flag ? GetStatisticsInfo(EndTime, Convert.ToInt32(RCB_NoteType.SelectedValue), filialeId, invoiceNo.ToString(), StartTime, pageIndex, pageSize, out msg, out recordCount)
                    : Invoice.ReadInstance.Search(StartTime, EndTime, filialeId, Convert.ToInt32(RCB_NoteType.SelectedValue), invoiceNo, pageSize, pageIndex, out recordCount);
                rad_invoce.DataSource       = InvoiceStatisticsInfo.InvoiceList;
                rad_invoce.VirtualItemCount = recordCount;

                //正票
                var zpInfo = InvoiceStatisticsInfo.NoteStatistics.FirstOrDefault(ent => ent.NoteType == InvoiceNoteType.Effective);
                //废票
                var fpInfo = InvoiceStatisticsInfo.NoteStatistics.FirstOrDefault(ent => ent.NoteType == InvoiceNoteType.Abolish);

                if (flag)
                {
                    lb_lp.Text = zpInfo != null?string.Format("{0}", zpInfo.TotalQuantity) : "0";

                    lb_lpsum.Text = zpInfo != null?WebControl.NumberSeparator(zpInfo.TotalMoney.ToString("#.##")) : "0.00";


                    lb_hp.Text = fpInfo != null?string.Format("{0}", fpInfo.TotalQuantity) : "0";

                    lb_hpsum.Text = fpInfo != null?WebControl.NumberSeparator(fpInfo.TotalMoney.ToString("#.##")) : "0.00";

                    var sum = zpInfo?.TotalMoney - (fpInfo?.TotalMoney ?? 0);
                    //实际金额
                    lb_tolsum.Text = WebControl.NumberSeparator(sum ?? 0);
                }
                else
                {
                    lab_zp.Text = zpInfo != null?string.Format("{0}", zpInfo.TotalQuantity) : "0";

                    lab_zpsum.Text = zpInfo != null?WebControl.NumberSeparator(zpInfo.TotalMoney.ToString("#.##")) : "0.00";


                    lab_fp.Text = fpInfo != null?string.Format("{0}", fpInfo.TotalQuantity) : "0";

                    Label_fpje.Text = fpInfo != null?WebControl.NumberSeparator(fpInfo.TotalMoney.ToString("#.##")) : "0.00";

                    //退票
                    var tpInfo = InvoiceStatisticsInfo.NoteStatistics.FirstOrDefault(ent => ent.NoteType == InvoiceNoteType.Retreat);
                    Label_tpzs.Text = tpInfo != null?string.Format("{0}", tpInfo.TotalQuantity) : "0";

                    Label_tpje.Text = tpInfo != null?WebControl.NumberSeparator(tpInfo.TotalMoney.ToString("#.##")) : "0.00";

                    //实际金额
                    lab_tol.Text = WebControl.NumberSeparator((zpInfo != null ? zpInfo.TotalMoney : 0) + (tpInfo != null ? tpInfo.TotalMoney : 0));
                }
            }
            else
            {
                rad_invoce.DataSource = new List <InvoiceBriefInfo>();
            }
        }
 protected void gv_presencia_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
 {
 }
Ejemplo n.º 34
0
 protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     GetDataSourcePendingUsers();
 }
Ejemplo n.º 35
0
 protected void NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     SetGridDataSource();
 }
Ejemplo n.º 36
0
 protected void CategoryNeedDataSource(object o, GridNeedDataSourceEventArgs e)
 {
     LoadCategories(false);
 }
Ejemplo n.º 37
0
 protected void radData_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     BindData();
 }
Ejemplo n.º 38
0
        /// <summary>
        /// Handles the NeedDataSource event of the gvInventory control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="GridNeedDataSourceEventArgs"/> instance containing the event data.</param>
        protected void gvInventory_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            List <CompanyInventoryDetails> inventoryDetails = this.GetBL <CompanyBL>().GetCompanyInventoryDetails(CompanyId);

            gvInventory.DataSource = inventoryDetails;
        }
Ejemplo n.º 39
0
 protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     RefreshGrid(false);
 }
Ejemplo n.º 40
0
 protected void OnGridNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     GrdProvidersNeedDataSorce();
 }
Ejemplo n.º 41
0
 protected void workersGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     workersGrid.DataSource = GetDataTable();
 }
Ejemplo n.º 42
0
 protected void rgStudent_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     rgStudent.DataSource = GetStudentCollection();
 }
Ejemplo n.º 43
0
        protected void OrgChartTrackerGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            OrgChartTrackerItemCollection collection = OrgChartTrackerItem.GetCollectionForUser(CurrentUserID);

            OrgChartTrackerGrid.DataSource = collection;
        }
Ejemplo n.º 44
0
        protected void GridNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            var objGrid = (RadGrid)sender;

            objGrid.DataSource = (from v in _vocabularyController.GetVocabularies() where v.ScopeType.ScopeType == "Application" || (v.ScopeType.ScopeType == "Portal" && v.ScopeId == PortalId) select v).ToList();
        }
Ejemplo n.º 45
0
 protected void NeedDataSource(object o, GridNeedDataSourceEventArgs e)
 {
     LoadBlogs(false);
 }
Ejemplo n.º 46
0
 protected void rgAdminPatientSearchView_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
 {
     BindPatientSearch(true);
 }
Ejemplo n.º 47
0
 protected void rGProfesionales_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
 {
 }
Ejemplo n.º 48
0
 protected void grvTrinhDoDT_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     grvTrinhDoDT.DataSource = _entities.GetAllTrinhDoDT();
 }
Ejemplo n.º 49
0
 protected void gridPerformance_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
 }
 // grd data loading and binding
 protected void grdLeaves_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     grdLeaves.DataSource = clsDAL.GetDataSet_Payroll("sp_Payroll_GetEmployeeLeaveBalanceRecordForSearchGrid", htSearchParams);
 }
Ejemplo n.º 51
0
        protected void RGPP_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            IList <PurchasingInfo> list = new List <PurchasingInfo>();

            Rgd_Purchasing.DataSource = list;
        }
Ejemplo n.º 52
0
 protected void rgRecordTypes_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
 {
     rgRecordTypes.DataSource = db.RecordTypes.Where(p => p.wsc_id == WSCID).Select(p => new { record_type_id = p.record_type_id, RecordType = p.type_ds + " (" + p.type_cd + ")", type_ds = p.type_ds }).OrderBy(p => p.type_ds);
 }
 protected void gvActiveCircuits_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     //dynamic dt = objBSS.GetComplainDetailByComplainID(Convert.ToInt32(Session["ComplainID"]));
     //gvActiveCircuits.DataSource = dt;
 }
Ejemplo n.º 54
0
 protected void rgSearchResults_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
 {
     rgSearchResults.MasterTableView.NoMasterRecordsText = "No Organization Chart are found for the selected search criteria. Please search again.";
     rgSearchResults.DataSource = GetSearchResults();
 }
Ejemplo n.º 55
0
        /// <summary>
        /// NeedDataSource event handler of the generic grid
        /// </summary>
        /// <param name="source"></param>
        /// <param name="e"></param>
        private void GenericGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            try
            {
                this.MasterTableView.FilterExpression = this.IndFilterExpression;
                if (!_UseAutomaticEntityBinding && _VirtualDataSource == null)
                {
                    return;
                }
                //Clear the columns in the master table
                this.MasterTableView.Columns.Clear();

                //Add the edit column
                AddEditColumn();

                //Add the delete column (checkbox column)
                AddDeleteColumn();

                DataSet sourceDS = new DataSet();

                if (_UseAutomaticEntityBinding)
                {
                    //Instantiate the referenced object
                    IGenericEntity viewEntity = EntityFactory.GetEntityInstance(_EntityType, SessionManager.GetSessionValueNoRedirect((IndBasePage)this.Page, SessionStrings.CONNECTION_MANAGER));

                    ((GenericUserControl)this.Parent.Parent).SetViewEntityProperties(viewEntity);
                    //Get all entities in this catalogue
                    sourceDS = viewEntity.GetAll(true);

                    //Creates a new GenericEntity object with the correct instance that will be used to add the logical column
                    object connectionManager = SessionManager.GetSessionValueNoRedirect((IndBasePage)this.Page, SessionStrings.CONNECTION_MANAGER);

                    //Add the logical column
                    EntityFactory.GetEntityInstance(this.EntityType, connectionManager).CreateLogicalKeyColumn(sourceDS.Tables[0]);
                }
                else
                {
                    if (!(_VirtualDataSource is DataSet) && !(_VirtualDataSource is DataTable))
                    {
                        throw new IndException(ApplicationMessages.MessageWithParameters(ApplicationMessages.EXCEPTION_VIRTUAL_DATASOURCE_OF_TYPE_NOT_SUPPORTED, _VirtualDataSource.GetType().ToString()));
                    }
                    if (_VirtualDataSource is DataSet)
                    {
                        sourceDS = (DataSet)_VirtualDataSource;
                    }
                    if (_VirtualDataSource is DataTable)
                    {
                        sourceDS.Tables.Add((DataTable)_VirtualDataSource);
                    }
                }

                //Add the data columns (with data from the db) to the grid
                AddDataColumns(sourceDS);

                if (_UseAutomaticEntityBinding)
                {
                    CurrentUser currentUser = SessionManager.GetSessionValueRedirect((IndBasePage)this.Page, SessionStrings.CURRENT_USER) as CurrentUser;
                    if (currentUser.HasEditPermission(ApplicationConstants.MODULE_HOURLY_RATE) && _EntityType == typeof(HourlyRate))
                    {
                        AddColumnHeaderControl("Value", "&nbsp<input type=\"image\" id=\"btnMassAttr\" class=\"IndImageButton\" title=\"Mass Attribution\" src=\"Images/mass_attribution_up.gif\" onclick=\"if (ShowPopUpWithoutPostBack('UserControls/Catalogs/HourlyRate/HRMassAttribution.aspx',520,560, '" + ResolveUrl("~/Default.aspx?SessionExpired=1") + "')){ __doPostBack('" + this.Page.ClientID + "',null);}return false;\"");
                    }
                    //Hide the columns that must not be shown (like Id)
                    HideColumns();
                }


                //Bind the grid to the dataset
                this.DataSource = sourceDS;

                SetDateColumnFormatString();
            }
            catch (IndException ex)
            {
                ControlHierarchyManager.ReportError(ex);
                return;
            }
            catch (Exception ex)
            {
                ControlHierarchyManager.ReportError(new IndException(ex));
                return;
            }
        }
Ejemplo n.º 56
0
 //列表条件:审批人=当前登录人;状态!=作废;申报时间三个月内;与当前单据申请人或者承担部门相同的
 protected void RG_Report_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
 {
     GridDataBind();
 }
Ejemplo n.º 57
0
 protected void resourcesGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
 {
     BindGrid(false);
 }
Ejemplo n.º 58
0
 // READ (data binding)
 protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     RadGrid1.DataSource = SessionDataSource;
 }
        protected void NoteGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            var notesList = _shopActivityNotice.SelectNoticeList().OrderBy(d => d.OrderIndex).ToList();

            NoteGrid.DataSource = notesList;
        }
Ejemplo n.º 60
0
 protected void RG_ReceiptInvoice_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
     GridDataBind();
 }