Example #1
0
        public TithelyClient(TithelyOptions options)
        {
            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12 | System.Net.SecurityProtocolType.Tls11;

            _organizationSet = new OrganizationSet(options);
            _accountSet      = new AccountSet(options);
            _chargeSet       = new ChargeSet(options);
        }
Example #2
0
        public static ChargeSet GetChargeSetDetail(string view)
        {
            DataTable dt    = WebSetDAL.BaseProvider.GetChargeSetDetail(view.Trim());
            ChargeSet model = null;

            if (dt.Rows.Count == 1)
            {
                model = new ChargeSet();
                model.FillData(dt.Rows[0]);
            }
            return(model);
        }
Example #3
0
        public JsonResult SaveCharge(string entity)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            ChargeSet            model      = serializer.Deserialize <ChargeSet>(entity);
            var result = false;

            if (model.AutoID == -1)
            {
                model.UserID = CurrentUser.UserID;
                result       = WebSetBusiness.InsertChargeSet(model);
            }
            else
            {
                result = WebSetBusiness.UpdateChargeSet(model);
            }
            JsonDictionary.Add("result", result);
            return(new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Example #4
0
        public static List <ChargeSet> GetChargeSet(string keyWords, string userid, int status, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string begintime = "", string endtime = "")
        {
            string tablename = " ChargeSet  a left join M_Users b  on a.UserID =b.UserID ";
            string sqlwhere  = " a.status<>9 ";

            if (!string.IsNullOrEmpty(keyWords))
            {
                sqlwhere += " and (b.Name like '%" + keyWords + "%' or a.Remark like '%" + keyWords + "%' or a.View like '%" + keyWords + "%')";
            }
            if (status > -1)
            {
                sqlwhere += " and a.status=" + status;
            }
            if (!string.IsNullOrEmpty(userid))
            {
                sqlwhere += " and a.UserID='" + userid + "' ";
            }
            if (!string.IsNullOrEmpty(begintime))
            {
                sqlwhere += " and a.CreateTime>='" + begintime + " 00:00:00'";
            }
            if (!string.IsNullOrEmpty(endtime))
            {
                sqlwhere += " and a.CreateTime<'" + endtime + " 23:59:59:999'";
            }
            DataTable        dt   = CommonBusiness.GetPagerData(tablename, "a.*,b.Name as UserName ", sqlwhere, "a.AutoID ", pageSize, pageIndex, out totalCount, out pageCount);
            List <ChargeSet> list = new List <ChargeSet>();

            foreach (DataRow dr in dt.Rows)
            {
                ChargeSet model = new ChargeSet();
                model.FillData(dr);
                list.Add(model);
            }
            return(list);
        }
Example #5
0
 public static bool UpdateChargeSet(ChargeSet model)
 {
     return(WebSetDAL.BaseProvider.UpdateChargeSet(model.AutoID, model.View, model.Remark, model.Golds));
 }
Example #6
0
 public static bool InsertChargeSet(ChargeSet model)
 {
     return(WebSetDAL.BaseProvider.InsertChargeSet(model.UserID, model.View.ToLower(), model.Remark, model.Golds));
 }