private void fpSpread1_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e) { // //{49390DE5-B54F-4b15-A012-208CDF288FF5} 可选择全部供货公司 int rowIndex = this.neuSpread1_Sheet1.ActiveRowIndex; if (rowIndex >= 0) { Neusoft.HISFC.Models.Pharmacy.Pay info = this.neuSpread1_Sheet1.Rows[rowIndex].Tag as Neusoft.HISFC.Models.Pharmacy.Pay; if (this.company != null && this.company.ID == "AAAA") { this.lbCompany.Text = "结存单位:" + this.company.Name + " 当前:" + this.companyHelper.GetName(info.Company.ID); } } this.ShowPayDetail(); }
/// <summary> /// 向结存汇总信息FarPoint内加入数据 /// </summary> /// <param name="pay">供货商结存实体</param> protected void AddPayHeadData(Neusoft.HISFC.Models.Pharmacy.Pay pay) { int rowCount = this.neuSpread1_Sheet1.Rows.Count; this.neuSpread1_Sheet1.Rows.Add(rowCount, 1); this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColChoose].Value = true; this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColInvoiceNo].Text = pay.InvoiceNO; this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColInvoiceDate].Value = pay.InvoiceTime; this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColInvoiceCost].Value = pay.PurchaseCost; this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColDiscountCost].Value = pay.DisCountCost; //应付金额通过FarPoint公式自动设置 this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColPaidUpCost].Value = pay.PayCost; this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColPayCost].Value = pay.UnPayCost; this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColDeliveryCost].Value = pay.DeliveryCost; this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColPayType].Value = pay.PayType; if (pay.Company.OpenBank == null || pay.Company.OpenBank == "") { this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColOpenBank].Value = this.company.OpenBank; } else { this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColOpenBank].Value = pay.Company.OpenBank; } if (pay.Company.OpenAccounts == null || pay.Company.OpenAccounts == "") { this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColOpenAccounts].Value = this.company.OpenAccounts; } else { this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColOpenAccounts].Value = pay.Company.OpenAccounts; } this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColDrugDept].Value = this.privDept.Name; this.neuSpread1_Sheet1.Cells[rowCount, (int)ColPayHeadSet.ColInListCode].Value = pay.InListNO; this.neuSpread1_Sheet1.Rows[rowCount].Tag = pay; }