コード例 #1
0
        public string DoCashAccounting(int userID, string ApplyDate, int FlowTypeID, string feeItemID, string feeItemName, string money, string cAdd)
        {
            string result = "{}";

            try
            {
                //获取记账日期
                string applyDate = ApplyDate;
                //获取流动资金类型
                FundFlowType ffType = WebComm.GetFundFlowTypeList().Where(f => f.ID == FlowTypeID).Single();

                string flowTypeID = ffType.ID.ToString();

                //获取流动资金类型名称
                string flowTypeName = ffType.Name;

                //获取类型
                string InOutType = ffType.InOutType;
                //获取资金
                string iMoney = money;

                string isJieKuan = flowTypeName.Contains("借") == true ? "Y" : "N";

                //获取备注信息

                string sql = "exec proc_AddCashAccouting '" + applyDate + "'," + flowTypeID + ",'" + flowTypeName + "','" + InOutType + "'," + feeItemID + ",'" + feeItemName + "'," + iMoney + "," + userID.ToString() + ",'" + isJieKuan + "','N','" + cAdd + "'";
                LycSQLHelper.ExecuteCommand(CommandType.Text, sql);
                result = WebComm.ReturnJsonForExterior(true, "现金记账成功!", "{}");
            }
            catch (Exception ex)
            {
                result = WebComm.ReturnJsonForExterior(false, "现金记账失败!" + ex.Message, "{}");
            }
            return(result);
        }
コード例 #2
0
        public string DoBankAccounting()
        {
            try
            {
                /***校验数据完整性***/
                if (Session[SessionList.FamilyManageUser.ToString()] == null)
                {
                    return(WebComm.ReturnLogOutPage());
                }
                if (Request.Form["FlowTypeID"] == "" || Request.Form["FlowTypeID"] == "-1")
                {
                    throw new Exception("请选择资金流动类型!");
                }

                User loginUser = Session[SessionList.FamilyManageUser.ToString()] as User;

                //获取记账日期
                string applyDate = Request.Form["ApplyDate"];
                //获取流动资金类型
                FundFlowType ffType = WebComm.GetFundFlowTypeList().Where(f => f.ID == Convert.ToInt32(Request.Form["FlowTypeID"])).Single();

                string flowTypeID = ffType.ID.ToString();

                //获取流动资金类型名称
                string flowTypeName = ffType.Name;

                //获取类型
                string InOutType = ffType.InOutType;

                //获取费用项目
                string feeItemID = Request.Form["search_Fee.FeeItemID"] == "" ? "0" : Request.Form["search_Fee.FeeItemID"];

                string feeItemName = Request.Form["search_Fee.FeeItemName"] == "" ? "" : Request.Form["search_Fee.FeeItemName"];

                //获取资金
                string iMoney = Request.Form["NowMoney"];

                string isJieKuan = flowTypeName.Contains("借") == true ? "Y" : "N";

                //获取入账银行信息
                string inUserBankID = Request.Form["In_bank.UserBankID"] == "" ? "0" : Request.Form["In_bank.UserBankID"];
                //获取出账银行信息
                string outUserBankID = Request.Form["Out_bank.UserBankID"] == "" ? "0" : Request.Form["Out_bank.UserBankID"];

                //获取备注信息
                string cAdd = Request.Form["cAdd"];

                string sql = "exec proc_AddBankAccouting '" + applyDate + "'," + flowTypeID + ",'" + flowTypeName + "','" + InOutType + "'," + feeItemID + ",'" + feeItemName + "'," + iMoney + "," + loginUser.ID.ToString() + "," + inUserBankID + "," + outUserBankID + ",'" + isJieKuan + "','N','" + cAdd + "','PCWeb',''";
                LycSQLHelper.ExecuteCommand(CommandType.Text, sql);
                return(WebComm.ReturnAlertMessage(ActionReturnStatus.成功, "记账成功!", "", "", CallBackType.none, ""));
            }
            catch (Exception ex)
            {
                return(WebComm.ReturnAlertMessage(ActionReturnStatus.失败, "记账失败!" + ex.Message, "", "", CallBackType.none, ""));
            }
        }
コード例 #3
0
 public string DeleteConfirmed(int id)
 {
     try
     {
         string sql = "exec proc_DeleteAccouting " + id.ToString() + " ";
         LycSQLHelper.ExecuteCommand(CommandType.Text, sql);
         return(WebComm.ReturnAlertMessage(ActionReturnStatus.成功, "删除成功!", "ApplySubListNav", "", CallBackType.none, ""));
     }
     catch (Exception ex)
     {
         return(WebComm.ReturnAlertMessage(ActionReturnStatus.失败, "删除失败!" + ex.Message, "", "", CallBackType.none, ""));
     }
 }
コード例 #4
0
        public string DoZhuanZhang(int userID, string ApplyDate, int FlowTypeID,
                                   string feeItemID, string feeItemName, string money,
                                   string inUBID, string outUBID, string cAdd)
        {
            string result = "{}";

            try
            {
                //获取记账日期
                string applyDate = ApplyDate;
                //获取流动资金类型
                FundFlowType ffType = WebComm.GetFundFlowTypeList().Where(f => f.ID == FlowTypeID).Single();

                string flowTypeID = ffType.ID.ToString();

                //获取流动资金类型名称
                string flowTypeName = ffType.Name;

                //获取类型
                string InOutType = ffType.InOutType;
                //获取资金
                string iMoney = money;

                //获取入账银行信息
                string inUserBankID = inUBID;
                //获取出账银行信息
                string outUserBankID = outUBID;

                //获取备注信息

                string sql = "exec proc_CashChange '" + applyDate + "'," + flowTypeID + ",'" + flowTypeName + "','" + InOutType + "'," + iMoney + "," + userID.ToString() + "," + inUserBankID + "," + outUserBankID + ",'" + cAdd + "'";
                LycSQLHelper.ExecuteCommand(CommandType.Text, sql);
                result = WebComm.ReturnJsonForExterior(true, "转账记账成功!", "{}");
            }
            catch (Exception ex)
            {
                result = WebComm.ReturnJsonForExterior(false, "转账记账失败!" + ex.Message, "{}");
            }
            return(result);
        }
コード例 #5
0
        /// <summary>
        /// 获取菜单树
        /// </summary>
        /// <param name="UserID">当前登录人ID</param>
        /// <returns></returns>
        public string GetSysModelTree(int UserID)
        {
            List <UserModelListEntity> list = new List <UserModelListEntity>();
            string sql = " select m.*,um.userID from SysModels m " +
                         " left join UserModelPower um on m.ID = um.modelID and um.userID = " + UserID.ToString() +
                         " where m.isFlag = 1 ";
            DataTable dt = LycSQLHelper.GetDataTable(sql);

            foreach (DataRow dr in dt.Rows)
            {
                UserModelListEntity uml = new UserModelListEntity();
                uml.ID = Convert.ToInt32(dr["ID"].ToString());

                uml.SysModelName       = dr["SysModelName"].ToString();
                uml.SysModelPhyURL     = dr["SysModelPhyURL"].ToString();
                uml.SysModelRouteName  = dr["SysModelRouteName"].ToString();
                uml.SysModelController = dr["SysModelController"].ToString();
                uml.SysModelAction     = dr["SysModelAction"].ToString();
                uml.SysModelRel        = dr["SysModelRel"].ToString();
                uml.SysModelTarget     = dr["SysModelTarget"].ToString();
                uml.SysModelUrlPram    = dr["SysModelUrlPram"].ToString();
                uml.SysModelClassID    = Convert.ToInt32(dr["SysModelClassID"].ToString());
                uml.SysModelLevel      = Convert.ToInt32(dr["SysModelLevel"].ToString());
                uml.IsLast             = Convert.ToBoolean(dr["IsLast"].ToString());
                uml.IsHaveAction       = Convert.ToBoolean(dr["IsHaveAction"].ToString());
                uml.IsFlag             = Convert.ToBoolean(dr["IsFlag"].ToString());
                uml.UserID             = dr.IsNull("UserID") ? 0 : Convert.ToInt32(dr["UserID"].ToString());
                uml.Checked            = !dr.IsNull("UserID") && uml.IsLast == true ? true : false;
                list.Add(uml);
            }
            umList = list;

            string result = GetSysModel(umList.Where(l => l.SysModelClassID == 0).ToList());

            return(result);
        }