/// <summary> /// 根据Dr内数据对实体进行赋值 /// </summary> /// <param name="dr">数据表</param> /// <param name="sysTime">当前时间</param> /// <param name="output">ref 出库实体信息</param> /// <returns>成功返回1 失败返回-1</returns> protected virtual int GetOutputFormDataRow(DataRow dr, DateTime sysTime, ref Neusoft.HISFC.Models.Material.Output output) { //出库数量 if (this.isUseMinUnit) //使用最小单位 { output.StoreBase.Quantity = NConvert.ToDecimal(dr["出库数量"]); } else { output.StoreBase.Quantity = NConvert.ToDecimal(dr["出库数量"]) * output.StoreBase.Item.PackQty; } output.StoreBase.Operation.Oper.ID = this.outManager.OperInfo.ID; output.StoreBase.Operation.Oper.OperTime = sysTime; output.StoreBase.Operation.ExamOper = output.StoreBase.Operation.Oper; //审批人 output.StoreBase.Operation.ExamQty = output.StoreBase.Quantity; output.Memo = dr["备注"].ToString(); //备注 if (this.outManager.TargetPerson != null) //领药人 { output.GetPerson = this.outManager.TargetPerson; } output.StoreBase.PrivType = this.outManager.PrivType.ID; //出库类型 output.StoreBase.SystemType = this.outManager.PrivType.Memo; //系统类型 output.StoreBase.StockDept = this.outManager.DeptInfo; //当前科室 output.StoreBase.TargetDept = myDept.GetDeptmentById(dr["目标科室"].ToString()); //this.outManager.TargetDept; //目标科室 //借方科目 暂时赋值为空 output.Debit = ""; return(1); }
public bool Valid() { if (this.phaInManager.TargetDept.ID == "") { System.Windows.Forms.MessageBox.Show(Language.Msg("请选择供货科室!")); return(false); } try { foreach (DataRow dr in this.dt.Rows) { if (NConvert.ToDecimal(dr["申请数量"]) <= 0) { System.Windows.Forms.MessageBox.Show(dr["商品名称"].ToString() + "申请数量不能小于等于零"); return(false); } //{99136B29-4E44-44aa-84DC-F3F24F2E98DE}退库申请时申请数量不能大于库存 if (isBack) { if (NConvert.ToDecimal(dr["申请数量"]) > NConvert.ToDecimal(dr["本科库存"])) { System.Windows.Forms.MessageBox.Show(dr["商品名称"].ToString() + "申请数量不能大于本科库存"); return(false); } } } } catch (Exception ex) { MessageBox.Show(ex.Message); return(false); } return(true); }
/// <summary> /// 获取月结记录 /// </summary> private void QueryStoreInterval() { Neusoft.FrameWork.Management.DataBaseManger dataManager = new Neusoft.FrameWork.Management.DataBaseManger(); if (this.OperDept.ID == "") { return; } DataSet ds = new DataSet(); string exeInterval = string.Format(this.sqlInterval, this.OperDept.ID); if (dataManager.ExecQuery(exeInterval, ref ds) == -1) { MessageBox.Show(Language.Msg("获取月结记录发生错误")); return; } if (ds != null && ds.Tables.Count > 0) { this.cmbMonthStoreInterval.Items.Clear(); foreach (DataRow dr in ds.Tables[0].Rows) { string strInterval = NConvert.ToDateTime(dr[0]).ToString() + "--" + NConvert.ToDateTime(dr[1]).ToString(); this.cmbMonthStoreInterval.Items.Add(strInterval); } } }
/// <summary> /// 由Fp内获取日报数据 /// </summary> /// <param name="rowIndex"></param> /// <returns></returns> protected Neusoft.HISFC.Models.HealthRecord.InpatientDayReport GetDayReport(int rowIndex) { Neusoft.HISFC.Models.HealthRecord.InpatientDayReport info = this.neuSpread1_Sheet1.Rows[rowIndex].Tag as Neusoft.HISFC.Models.HealthRecord.InpatientDayReport; if (info == null) { return(null); } info.ID = this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColDeptCode].Text; info.Name = this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColDeptName].Text; info.BedStand = NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColStarandNum].Text); info.BedAdd = NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColAddNum].Text); info.BedFree = NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColFreeNum].Text); info.BeginningNum = NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColBeginNum].Text); info.InNormal = NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColInNum].Text); //{C4E9B22C-A959-40e8-BCD1-0796F0EE0F4E} 随志芳 设置常规入院人数 info.InNormal = info.InNormal - info.InEmergency; info.InTransfer = NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColTransferIn].Text); info.OutTransfer = NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColTransferOut].Text); info.OutNormal = NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColOutNu].Text); //{C4E9B22C-A959-40e8-BCD1-0796F0EE0F4E} 随志芳 设置常规出院人数 info.OutNormal = info.OutNormal + info.InReturn - info.OutWithdrawal; info.EndNum = NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[rowIndex, (int)ColumnSet.ColEndNum].Text); return(info); }
public int AddItem(FarPoint.Win.Spread.SheetView sv, int activeRow) { string drugID = ""; if (isBack) { drugID = sv.Cells[activeRow, 4].Value.ToString(); string outbillNO = sv.Cells[activeRow, 1].Value.ToString(); string outNo = sv.Cells[activeRow, 2].Value.ToString(); string stockNo = sv.Cells[activeRow, 3].Value.ToString(); if (this.isBack) { return(this.AddDrugData(drugID, outNo, stockNo)); } else { //{3F8F98B1-44E9-4828-90C4-0931F6DA7B87} //return this.AddDrugData(drugID, outbillNO); return(-1); } } else { //自定义码和物资编码已对调 {7019A2A6-ADCA-4984-944B-C4F1A312449A} //drugID = sv.Cells[activeRow, 0].Value.ToString(); drugID = sv.Cells[activeRow, 11].Value.ToString(); //{3F8F98B1-44E9-4828-90C4-0931F6DA7B87} decimal applyPrice = NConvert.ToDecimal(sv.Cells[activeRow, 3].Text); //----------------------- return(this.AddDrugData(drugID, applyPrice)); } }
private PointF[] GetCustomShapeDotPoints() { try { if (CustomShapePoints == null) { return(null); } List <PointF> result = new List <PointF>(); var points = CustomShapePoints.Split(','); for (int i = 0; i < points.Length; i = i + 2) { float px = NConvert.ToSingle(points[i]); float py = NConvert.ToSingle(points[i + 1]); float spx = (X + (px * Width)) * Pixel2DotScaleFactor; float spy = (Y + (py * Height)) * Pixel2DotScaleFactor; result.Add(new PointF(spx, spy)); } return(result.ToArray()); } catch { return(null); } }
/// <summary> /// 根据病历号查找黑名单主表数据 /// </summary> /// <param name="cardNO">病历号</param> /// <param name="pbl">黑名单实体</param> /// <returns></returns> public int GetBlackListMain(string cardNO, ref PatientBlackList pbl) { string sqlStr = string.Empty; if (this.Sql.GetSql("Fee.BlackList.SelectBlackList", ref sqlStr) == -1) { this.Err = "查找SQL语句Fee.BlackList.SelectBlackList失败!"; return(-1); } try { sqlStr = string.Format(sqlStr, cardNO); if (this.ExecQuery(sqlStr) == -1) { this.Err = "查找患者黑名单数据失败!"; return(-1); } pbl = new PatientBlackList(); while (this.Reader.Read()) { pbl.CardNO = this.Reader[0].ToString(); pbl.BlackListValid = NConvert.ToBoolean(this.Reader[1].ToString()); } return(1); } catch (Exception ex) { this.Err = ex.Message; return(-1); } }
/// <summary> /// 获得合同单位数组 /// </summary> /// <param name="pactUnit">合同单位实体</param> /// <returns>获得合同单位数组</returns> private string[] GetPactUnitParams(Neusoft.HISFC.Models.Base.PactInfo pactUnit) { string[] args = { pactUnit.ID, pactUnit.PayKind.ID, pactUnit.Rate.PubRate.ToString(), pactUnit.Rate.PayRate.ToString(), pactUnit.Rate.OwnRate.ToString(), pactUnit.Rate.RebateRate.ToString(), pactUnit.Rate.ArrearageRate.ToString(), NConvert.ToInt32(pactUnit.Rate.IsBabyShared).ToString(), NConvert.ToInt32(pactUnit.IsNeedMCard).ToString(), NConvert.ToInt32(pactUnit.IsInControl).ToString(), pactUnit.ItemType, pactUnit.DayQuota.ToString(), pactUnit.MonthQuota.ToString(), pactUnit.YearQuota.ToString(), pactUnit.OnceQuota.ToString(), pactUnit.PriceForm, pactUnit.BedQuota.ToString(), pactUnit.AirConditionQuota.ToString(), pactUnit.SortID.ToString(), this.Operator.ID, pactUnit.ShortName, pactUnit.PactDllName, pactUnit.PactDllDescription }; return(args); }
/// <summary> /// 加价率设置 /// </summary> protected void SetTransferRate(object sender, System.EventArgs args) { frmEasyData frm = new frmEasyData(); frm.EasyLabel = "加价率"; frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { try { if (NConvert.ToDecimal(frm.EasyData) <= 0) { MessageBox.Show(Language.Msg("请正确设置价让率"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); this.SetTransferRate(null, System.EventArgs.Empty); } else { this.defaultPriceRate = NConvert.ToDecimal(frm.EasyData) + 1; this.phaOutManager.ShowInfo = "当前价让加价率:" + this.defaultPriceRate.ToString("N"); } } catch (Exception e) { MessageBox.Show(Language.Msg("请正确设置价让率"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); this.SetTransferRate(null, System.EventArgs.Empty); } } }
/// <summary> /// 删除医嘱批次设置信息 /// </summary> /// <returns></returns> protected int DelOrderGroup() { DialogResult rs = MessageBox.Show(Language.Msg("确认删除医嘱批次设置信息?"), "", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rs == DialogResult.No) { return(1); } string groupCode = this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, 0].Text; DateTime dtBegin = NConvert.ToDateTime(this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, 1].Text); DateTime dtEnd = NConvert.ToDateTime(this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, 2].Text); int returnValue = this.consManager.DelOrderGroup(groupCode, dtBegin, dtEnd); if (returnValue == -1) { MessageBox.Show(Language.Msg("删除医嘱批次设置信息发生错误")); return(-1); } this.neuSpread1_Sheet1.Rows.Remove(this.neuSpread1_Sheet1.ActiveRowIndex, 1); if (returnValue == 0) { MessageBox.Show("删除成功!"); return(1); } MessageBox.Show("删除成功!\n已经成功从数据库中删除信息"); return(1); }
/// <summary> /// /// </summary> /// <param name="info"></param> /// <returns></returns> public int InsertPowerLevelClass3(PowerLevelClass3 info) { string strSql = ""; if (this.Sql.GetSql("Manager.PowerLevelManager.InsertPowerLevelClass3", ref strSql) == -1) { return(-1); } try { strSql = string.Format(strSql, info.Class2Code, info.Class3Code, info.Class3Name, info.Class3MeaningCode, info.Class3MeaningName, NConvert.ToInt32(info.FinFlag).ToString(), NConvert.ToInt32(info.DelFlag).ToString(), NConvert.ToInt32(info.GrantFlag).ToString(), info.Class3JoinCode, info.JoinGroupCode, info.JoinGroupOrder, NConvert.ToInt32(info.CheckFlag).ToString(), info.Memo, this.Operator.ID); } catch (Exception ex) { this.Err = ex.Message; this.ErrCode = ex.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
private void value_FpKeyEvent(Keys key) { if (this.svTemp != null) { if (key == Keys.Enter) { if (this.svTemp.ActiveColumnIndex == (int)ColumnSet.ColApplyQty) { decimal applyQty = NConvert.ToDecimal(this.svTemp.Cells[this.svTemp.ActiveRowIndex, (int)ColumnSet.ColApplyQty].Text); decimal price = NConvert.ToDecimal(this.svTemp.Cells[this.svTemp.ActiveRowIndex, (int)ColumnSet.ColRetailPrice].Text); this.svTemp.Cells[this.svTemp.ActiveRowIndex, (int)ColumnSet.ColApplyCost].Text = (applyQty * price).ToString(); this.CompuateSum(); } if (this.svTemp.ActiveRowIndex == this.svTemp.Rows.Count - 1) { this.phaInManager.SetFocus(); } else { this.svTemp.ActiveRowIndex++; this.svTemp.ActiveColumnIndex = (int)ColumnSet.ColApplyQty; } } } }
public int AddItem(FarPoint.Win.Spread.SheetView sv, int activeRow) { string drugNO = sv.Cells[activeRow, 0].Text; int groupNO = NConvert.ToInt32(sv.Cells[activeRow, 1].Value); return(this.AddInData(drugNO, groupNO)); }
/// <summary> /// 有效性判断 /// </summary> /// <returns>填写有效 返回True 否则返回 False</returns> public virtual bool Valid() { if (this.phaInManager.TargetDept.ID == "") { MessageBox.Show(Language.Msg("请选择供货公司")); return(false); } Neusoft.FrameWork.Management.DataBaseManger dataManager = new DataBaseManger(); DateTime sysTime = dataManager.GetDateTimeFromSysDateTime(); foreach (DataRow dr in this.dt.Rows) { if (NConvert.ToDecimal(dr["入库数量"]) <= 0) { MessageBox.Show(Language.Msg(dr["商品名称"].ToString() + " 请输入入库数量 入库数量不能小于等于0")); return(false); } if (dr["批号"].ToString() == "") { MessageBox.Show(Language.Msg("请输入批号")); return(false); } if (NConvert.ToDateTime(dr["有效期"]) < sysTime) { MessageBox.Show(Language.Msg(dr["商品名称"].ToString() + " 有效期应大于当前日期")); return(false); } } return(true); }
/// <summary> /// 获取月结明细信息 /// </summary> /// <returns></returns> protected int ShowMonthStoreDetail() { DateTime dtBeginTime = NConvert.ToDateTime(this.fpHeadSheet.Cells[this.fpHeadSheet.ActiveRowIndex, 0].Text); DateTime dtEndTime = NConvert.ToDateTime(this.fpHeadSheet.Cells[this.fpHeadSheet.ActiveRowIndex, 1].Text); if (this.cmbStoreDept.Tag == null || this.cmbStoreDept.Tag.ToString() == "") { return(-1); } if (this.matManager.GetMonthStoreDetailByID(this.cmbStoreDept.Tag.ToString(), dtBeginTime, dtEndTime, ref this.dsDetail) == -1) { MessageBox.Show(Language.Msg("获取月结明细信息失败") + this.matManager.Err); return(-1); } if (dsDetail.Tables.Count <= 0) { return(-1); } this.fpDetailSheet.DataSource = dsDetail.Tables[0].DefaultView; if (dsDetail.Tables[0].Rows.Count > 0) { this.neuSpread1.ActiveSheet = this.fpDetailSheet; } return(1); }
/// <summary> /// 获得非药品组合项目的实体属性数组 /// </summary> /// <param name="undrugComb">非药品组合项目实体</param> /// <returns>非药品组合项目的实体属性数组</returns> private string[] GetUndrugCombParams(Neusoft.HISFC.Object.Fee.Item.UndrugComb undrugComb) { string[] args = { undrugComb.Package.ID, undrugComb.Package.Name, undrugComb.SysClass.ID.ToString(), undrugComb.SpellCode, undrugComb.WBCode, undrugComb.UserCode, undrugComb.ExecDept, undrugComb.SortID.ToString(), NConvert.ToInt32(undrugComb.IsNeedConfirm).ToString(), undrugComb.ValidState, undrugComb.User01, undrugComb.User02, undrugComb.Memo, undrugComb.Mark1, undrugComb.Mark2, undrugComb.Mark3, undrugComb.Mark4 }; return(args); }
public void PassSetPatientInfo(Register patient, string docID, string docName) { if (((patient != null) && this.PassEnabled) && (PassGetState("0") != 0)) { string str2; string patientNO = patient.PID.PatientNO; try { str2 = NConvert.ToInt32(patient.ID.Substring(2, 2)).ToString(); } catch { str2 = "1"; } string name = patient.Name; string sex = ""; if ((patient.Sex.ID.ToString() == "F") || (patient.Sex.ID.ToString() == "M")) { sex = patient.Sex.Name; } else { sex = "未知"; } string birthday = patient.Birthday.ToString("yyyy-MM-dd"); string weight = patient.Weight; string height = patient.Height; string departMentName = patient.PVisit.PatientLocation.Dept.ID + "/" + patient.PVisit.PatientLocation.Dept.Name; string doctor = patient.PVisit.AdmittingDoctor.ID + "/" + patient.PVisit.AdmittingDoctor.Name; string leaveHospitalDate = ""; PassDoCommand(0x192); PassSetPatientInfo(patientNO, str2, name, sex, birthday, weight, height, departMentName, doctor, leaveHospitalDate); } }
public APngAnimationProvider(string path, NConvert meta) : base(path, meta) { if (!IsAnimatedPng(path)) { _nativeImageProvider = new NativeImageProvider(path, meta); Animator = _nativeImageProvider.Animator; return; } var decoder = new APNGBitmap(path); _baseFrame = decoder.DefaultImage; _frames = new List <FrameInfo>(decoder.Frames.Length); _renderedFrames = new List <BitmapSource>(decoder.Frames.Length); Enumerable.Repeat(0, decoder.Frames.Length).ForEach(_ => _renderedFrames.Add(null)); Animator = new Int32AnimationUsingKeyFrames { RepeatBehavior = RepeatBehavior.Forever }; var wallclock = TimeSpan.Zero; for (var i = 0; i < decoder.Frames.Length; i++) { var frame = decoder.Frames[i]; _frames.Add(new FrameInfo(decoder.IHDRChunk, frame)); Animator.KeyFrames.Add(new DiscreteInt32KeyFrame(i, KeyTime.FromTimeSpan(wallclock))); wallclock += _frames[i].Delay; } }
public int SetData(List <Neusoft.HISFC.Models.FeeStuff.Input> listInput) { this.maxRowNO = 12; try { List <Neusoft.HISFC.Models.Material.Input> alPrint = new List <Neusoft.HISFC.Models.Material.Input>(); int icount = NConvert.ToInt32(System.Math.Ceiling(Convert.ToDouble(listInput.Count) / this.MaxRowNo)); for (int i = 0; i < icount; i++) { if (i != icount - 1) { alPrint = listInput.GetRange(i, this.MaxRowNo); } else { int num = listInput.Count % this.MaxRowNo; if (num == 0) { num = this.MaxRowNo; } alPrint = listInput.GetRange(i, num); } this.Print(alPrint, i + 1, icount, "", ""); } return(1); } catch (System.Exception e) { MessageBox.Show("打印出错!" + e.Message); return(-1); } }
private void ntbPurchasePrice_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Enter) { if (NConvert.ToDecimal(this.ntbPurchasePrice.Text) <= 0) { MessageBox.Show(Language.Msg("请正确输入购入价 购入价应大于等于零")); this.errorProvider1.SetError(this.ntbPurchasePrice, "购入价必须输入且大于0"); this.ntbPurchasePrice.Focus(); return; } else { this.errorProvider1.Clear(); } this.ComputeCost(); if (this.isManagerFac) { this.cmbProduce.Focus(); } else if (this.isManagerExtend) { this.txtDeliveryNO.Focus(); } else { this.btnOK.Focus(); } } }
/// <summary> /// 根据科室、终端类型初始化 /// </summary> /// <param name="enumType"></param> protected virtual void InitData(Neusoft.HISFC.Models.Pharmacy.EnumTerminalType enumType) { //根据库房编码、终端类型检索数据 ArrayList al = drugStore.QueryDrugTerminalByDeptCode(this.privDept.ID, (NConvert.ToInt32(enumType)).ToString( )); if (al == null) { MessageBox.Show(this.drugStore.Err); return; } Neusoft.HISFC.Models.Pharmacy.DrugTerminal info; for (int i = 0; i < al.Count; i++) { info = al[i] as Neusoft.HISFC.Models.Pharmacy.DrugTerminal; if (info == null) { continue; } if (!this.IsShowSpecialTerminal && info.TerminalProperty == Neusoft.HISFC.Models.Pharmacy.EnumTerminalProperty.普通) { continue; } //添加节点 this.SetItem(info); } }
/// <summary> /// 获取输入的入库信息 /// </summary> private void GetInInstance() { if (this.inInstance == null) { this.inInstance = new Neusoft.HISFC.Models.Pharmacy.Input(); } if (this.item == null || this.item.ID == "") { return; } this.inInstance.Item = this.item; //药品信息 this.inInstance.Quantity = NConvert.ToDecimal(this.ntbInQty.NumericValue) * this.item.PackQty; //入库数量 this.inInstance.RetailCost = NConvert.ToDecimal(this.ntbInCost.NumericValue); //入库金额 this.inInstance.BatchNO = Neusoft.FrameWork.Public.String.TakeOffSpecialChar(this.txtBatchNO.Text.Trim()); //批 号 this.inInstance.ValidTime = this.dtValidTime.Value.Date; //有 效 期 this.inInstance.InvoiceNO = Neusoft.FrameWork.Public.String.TakeOffSpecialChar(this.txtInvoiceNO.Text.Trim()); //发 票 号 this.inInstance.InvoiceType = this.cmbInvoiceType.Text.Trim(); //发票分类 this.inInstance.Item.PriceCollection.PurchasePrice = NConvert.ToDecimal(this.ntbPurchasePrice.NumericValue); //购入价 if (this.cmbProduce.Tag != null) //生产厂家 { //{3F6FF86C-0C62-44de-B09B-595B297DD832} this.inInstance.Producer.ID = this.cmbProduce.Tag.ToString(); this.inInstance.Producer.Name = this.cmbProduce.Text.Trim(); //{C03DD304-AE71-4b6a-BC63-F385DB162EB7} this.inInstance.Item.Product.Producer.ID = this.cmbProduce.Tag.ToString(); this.inInstance.Item.Product.Producer.Name = this.cmbProduce.Text.Trim(); } this.inInstance.DeliveryNO = this.txtDeliveryNO.Text.Trim(); //送货单号 this.inInstance.PlaceNO = Neusoft.FrameWork.Public.String.TakeOffSpecialChar(this.txtPlaceNO.Text.Trim()); //货位号 this.inInstance.Memo = Neusoft.FrameWork.Public.String.TakeOffSpecialChar(this.txtMemo.Text); //备注 }
public bool Valid() { try { foreach (DataRow dr in this.dt.Rows) { if (NConvert.ToDecimal(dr["出库数量"]) <= 0) { MessageBox.Show(Language.Msg(dr["商品名称"].ToString() + " 出库数量不能小于等于零")); return(false); } if (NConvert.ToDecimal(dr["库存数量"]) < NConvert.ToDecimal(dr["出库数量"])) { MessageBox.Show(Language.Msg(dr["商品名称"].ToString() + " 出库数量不能大于当前库存量")); return(false); } } return(true); } catch (Exception ex) { MessageBox.Show(ex.Message); return(false); } }
/// <summary> /// 校验 /// </summary> /// <returns></returns> private bool Valid() { decimal money = NConvert.ToDecimal(this.txtMoney.Text); if (money <= 0) { MessageBox.Show("请输入授权限额!"); this.txtMoney.Focus(); return(false); } if (isEdit) { if (accountEmpower.PassWord != this.txtoldpw.Text.Trim()) { MessageBox.Show("原始密码输入不正确请重新输入!"); this.txtnewpwd.Focus(); return(false); } } if (ckflag.Checked) { if (!ValidPassword()) { this.txtnewpwd.Text = string.Empty; this.txtconfirmpwd.Text = string.Empty; this.txtnewpwd.Focus(); return(false); } } return(true); }
private void neuSpread1_EditModeOff(object sender, EventArgs e) { decimal radixQty = NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, (int)ColumnSet.ColRadixQty].Text); decimal surplusQty = NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, (int)ColumnSet.ColSurplusQty].Text); decimal expendQty = NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, (int)ColumnSet.ColExpendQty].Text); this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, (int)ColumnSet.ColSupllyQty].Text = (radixQty + expendQty - surplusQty).ToString(); }
/// <summary> /// 查找要日结的数据 /// </summary> protected virtual void SetDayBalance() { dayBalance.BeginTime = NConvert.ToDateTime(this.lastDate); dayBalance.EndTime = NConvert.ToDateTime(this.dayBalanceDate); dayBalance.Oper.ID = currentOperator.ID; dayBalance.Oper.Name = currentOperator.Name; this.alData.Add(dayBalance); }
/// <summary> /// 执行SQL语句,读取linkWay实体信息到ArrayList中 /// </summary> /// <param name="strSQL">需要执行的SQL语句</param> /// <returns>返回数组、错误返回null</returns> private ArrayList ReadLinkWayInfo(string strSQL) { this.ExecQuery(strSQL); ArrayList list = new ArrayList(); Neusoft.HISFC.Models.HealthRecord.Visit.LinkWay linkWay = null; try { while (this.Reader.Read()) { linkWay = new Neusoft.HISFC.Models.HealthRecord.Visit.LinkWay(); linkWay.ID = this.Reader[0].ToString(); if (this.Reader[1].ToString().Equals("1")) { linkWay.IsLinkMan = true; } else { linkWay.IsLinkMan = false; } linkWay.LinkMan.Name = this.Reader[2].ToString(); linkWay.LinkWayType.ID = this.Reader[3].ToString(); linkWay.Relation.ID = this.Reader[4].ToString(); linkWay.Patient.PID.CardNO = this.Reader[5].ToString(); linkWay.ZIP = this.Reader[6].ToString(); linkWay.OperEnvi.ID = this.Reader[7].ToString(); linkWay.OperEnvi.OperTime = NConvert.ToDateTime(this.Reader[8].ToString()); linkWay.Address = this.Reader[9].ToString(); linkWay.Mail = this.Reader[10].ToString(); linkWay.Phone = this.Reader[11].ToString(); linkWay.OtherLinkway = this.Reader[12].ToString(); linkWay.Memo = this.Reader[13].ToString(); linkWay.User01 = this.Reader[14].ToString(); linkWay.User02 = this.Reader[15].ToString(); linkWay.User03 = this.Reader[16].ToString(); linkWay.LinkWayType.Name = this.Reader[17].ToString(); linkWay.Relation.Name = this.Reader[18].ToString(); linkWay.OperEnvi.Name = this.Reader[19].ToString(); list.Add(linkWay); } } catch (Exception ex) { this.Err = "读取联系方式出错!" + ex.Message; return(null); } finally { this.Reader.Close(); } //返回数组 return(list); }
private static AnimationProvider LoadFullImageCore(Uri path, NConvert meta) { var ext = Path.GetExtension(path.LocalPath).ToLower(); var type = Providers.First(p => p.Key.Contains(ext) || p.Key.Contains("*")).Value; var provider = type.CreateInstance <AnimationProvider>(path.LocalPath, meta); return(provider); }
/// <summary> /// 根据床位等级编码提取BedFeeItem信息 /// </summary> /// <param name="minFeeCode">最小费用编码</param> /// <returns>成功: 床位信息数组, 失败 null, 没有找到数据:元素为0的ArrayList</returns> public ArrayList QueryBedFeeItemByMinFeeCode(string minFeeCode) { string sql = string.Empty; //查询SQL语句 if (this.Sql.GetSql("Fee.BedFeeItem.SelectByFeeCode", ref sql) == -1) { this.Err = "没有找到索引为:Fee.BedFeeItem.SelectByFeeCode的SQL语句"; return(null); } if (this.ExecQuery(sql, minFeeCode) == -1) { return(null); } try { ArrayList bedFeeItems = new ArrayList(); //循环读取数据 while (this.Reader.Read()) { Neusoft.HISFC.Models.Fee.BedFeeItem bedFeeItem = new Neusoft.HISFC.Models.Fee.BedFeeItem(); bedFeeItem.PrimaryKey = this.Reader[0].ToString(); bedFeeItem.FeeGradeCode = this.Reader[1].ToString(); bedFeeItem.ID = this.Reader[2].ToString(); bedFeeItem.Name = this.Reader[3].ToString(); bedFeeItem.Qty = NConvert.ToDecimal(this.Reader[4].ToString()); bedFeeItem.SortID = NConvert.ToInt32(this.Reader[5].ToString()); bedFeeItem.IsBabyRelation = NConvert.ToBoolean(this.Reader[6].ToString()); bedFeeItem.IsTimeRelation = NConvert.ToBoolean(this.Reader[7].ToString()); bedFeeItem.BeginTime = NConvert.ToDateTime(this.Reader[8].ToString()); bedFeeItem.EndTime = NConvert.ToDateTime(this.Reader[9].ToString()); bedFeeItem.ValidState = (EnumValidState)NConvert.ToInt32(this.Reader[10]); bedFeeItem.ExtendFlag = this.Reader[13].ToString(); bedFeeItems.Add(bedFeeItem); } this.Reader.Close(); return(bedFeeItems); } catch (Exception e) { this.Err = e.Message; if (!this.Reader.IsClosed) { this.Reader.Close(); } return(null); } }
///<summary> ///根据药品警戒线加入数据 ///</summary> ///<param name="alterFlag">生成方式 0 警戒线 1 日消耗</param> ///<param name="deptCode">库房编码</param> ///<returns>成功返回0,失败返回-1</returns> public void FindByAlter(string alterFlag, string deptCode) { if (this.hsApplyData.Count > 0) { DialogResult result; result = MessageBox.Show("按警戒线生成将清除当前内容,是否继续", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign); if (result == DialogResult.No) { return; } } try { this.Clear(); ArrayList alDetail = new ArrayList(); if (alterFlag == "1") { #region 弹出窗口 设置日消耗参数 计算需申请信息 using (HISFC.Components.Pharmacy.ucPhaAlter uc = new ucPhaAlter()) { uc.DeptCode = deptCode; uc.SetData(); uc.Focus(); Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(uc); if (uc.ApplyInfo != null) { alDetail = uc.ApplyInfo; } } #endregion } else { //{F4D82F23-CCDC-45a6-86A1-95D41EF856B8} 更改调用函数 alDetail = this.itemManager.QueryDrugListByNumAlter(deptCode); if (alDetail == null) { MessageBox.Show(Language.Msg("按照数量警戒线执行信息计算未正确执行\n" + this.itemManager.Err)); return; } } Neusoft.HISFC.Models.Pharmacy.Item item = new Neusoft.HISFC.Models.Pharmacy.Item(); foreach (Neusoft.FrameWork.Models.NeuObject temp in alDetail) { this.AddDrugData(temp.ID, null, NConvert.ToDecimal(temp.User03)); } } catch (Exception ex) { MessageBox.Show(Language.Msg(ex.Message)); } }