Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public bool UpdateOrInsertChangePrepay(Neusoft.HISFC.Models.Fee.TransferPrepay info)
        {
            bool Result = true;;
            int  temp   = 0;

            temp = IsAlreadyInChangePrepay(info.Type.ID, info.ID);
            if (temp > 0)
            {
                //¸üÐÂ
                if (UpdateChangePrepay(info) <= 0)
                {
                    Result = false;                   //¸üÐÂʧ°Ü
                }
            }
            else if (temp == 0)
            {
                //²åÈë
                if (InsertChangePrepay(info) <= 0)
                {
                    Result = false;                     //²åÈëʧ°Ü
                }
            }
            else
            {
                //³ö´íÁË¡£
                Result = false;
            }
            return(Result);
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int UpdateChangePrepay(Neusoft.HISFC.Models.Fee.TransferPrepay info)
        {
            string strSql = "";

            //update fin_com_changeprepay set prepay_cost ={0} where change_type ='{1}' and clinic_no ='{2}' and change_code ='[±¾¼¶±àÂë]' and current_code ='[¸¸¼¶±àÂë]' and parent_code='[±¾¼¶±àÂë ]'
            if (this.Sql.GetSql("Fee.TransferPrepay.UpdateChangePrepay", ref strSql) == -1)
            {
                return(-1);
            }
            try
            {
                string OperCode = this.Operator.ID;
                strSql = string.Format(strSql, info.FT.TransferPrepayCost, info.Type.ID, info.ID);
            }
            catch (Exception ee)
            {
                string Error = ee.Message;
                return(-1);
            }
            return(this.ExecNoQuery(strSql));
        }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int DeleteChangePrepay(Neusoft.HISFC.Models.Fee.TransferPrepay info)
        {
            string strSql = "";

            if (this.Sql.GetSql("Fee.TransferPrepay.DeleteChangePrepay", ref strSql) == -1)
            {
                return(-1);
            }
            try
            {
                string OperCode = this.Operator.ID;
                // delete fin_com_changeprepay where clinic_no ='{0}' and change_type ='{1}' and change_code ='[±¾¼¶±àÂë]' and PARENT_CODE ='[¸¸¼¶±àÂë]' and CURRENT_CODE ='[±¾¼¶±àÂë]'
                strSql = string.Format(strSql, info.ID, info.Type.ID);
            }
            catch (Exception ee)
            {
                string Error = ee.Message;
                return(-1);
            }
            return(this.ExecNoQuery(strSql));
        }
Example #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int InsertChangePrepay(Neusoft.HISFC.Models.Fee.TransferPrepay info)
        {
            string strSql = "";

            if (this.Sql.GetSql("Fee.TransferPrepay.InsertChangePrepay", ref strSql) == -1)
            {
                return(-1);
            }
            try
            {
                string OperCode = this.Operator.ID;
                //insert into fin_com_changeprepay (PARENT_CODE,CURRENT_CODE,CHANGE_TYPE,CLINIC_NO,NAME,PAYKIND_CODE,PACT_CODE,PREPAY_COST,CHARGE_OPERCODE,CHARGE_DATE ,BALANCE_STATE,OPER_CODE,OPER_DATE)
                //values ('[¸¸¼¶±àÂë]','[±¾¼¶±àÂë]','[±¾¼¶±àÂë]','{0}','{1}','{2}','{3}',{4},'{5}',sysdate,'{6}','{7}',sysdate)
                strSql = string.Format(strSql, info.Type.ID, info.ID, info.Name, info.Pact.PayKind.ID, info.Pact.ID, info.FT.TransferPrepayCost, OperCode, info.BalanceState, OperCode);
            }
            catch (Exception ee)
            {
                string Error = ee.Message;
                return(-1);
            }
            return(this.ExecNoQuery(strSql));
        }