Esempio n. 1
0
        /// <summary>
        /// 用户充值
        /// </summary>
        /// <param name="idcard"></param>
        /// <param name="fee"></param>
        public string DepositUserWallet(string idcard, string fee)
        {
            Dictionary <string, string> ret = new Dictionary <string, string>();

            ret.Add("ret", "0");
            string    sql    = "select * from v_CF_User_View where IDCard='" + idcard + "'";
            DataTable dt     = MySQLHelper.ExecuteDataset(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql)).Tables[0];
            string    userId = dt.Rows[0]["UserID"].ToString();

            sql = "select * from CF_User_Extenal where UserID=" + dt.Rows[0]["UserID"].ToString();
            dt  = MySQLHelper.ExecuteDataset(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql)).Tables[0];
            string feeRate = ConfigurationManager.AppSettings["FeeRate"];

            if (dt.Rows.Count > 0)
            {
                decimal wallet = decimal.Parse(dt.Rows[0]["Wallet"].ToString()) + decimal.Parse(fee);
                sql = "update CF_User_Extenal set wallet = " + wallet.ToString() + " where ExternalID=" + dt.Rows[0]["ExternalID"].ToString();
                MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
                ret.Add("fee", wallet.ToString());
            }
            else
            {
                decimal wallet = decimal.Parse(fee);
                sql = "Insert into CF_User_Extenal values (" + userId + "," + wallet.ToString() + ",0,'','','')";
                MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
                ret.Add("fee", wallet.ToString());
            }
            return(JSONHelper.ToJson(ret));
        }
Esempio n. 2
0
        public void DeleteCommunityRelationship(string guid)
        {
            StringBuilder sqlStr = new StringBuilder();

            sqlStr.Append("delete from Rent_user_community_relationship where t_fun_guid='" + guid + "'");
            MySQLHelper.ExecuteNonQuery(SqlConnString, MySQLHelper.CreateCommand(sqlStr.ToString()));
        }
Esempio n. 3
0
        public void DeleteCorporation(string corpId)
        {
            StringBuilder sqlStr = new StringBuilder();

            sqlStr.Append("delete from  t_corporation where co_corp_id='" + corpId + "'");
            MySQLHelper.ExecuteNonQuery(SqlConnString, MySQLHelper.CreateCommand(sqlStr.ToString()));
        }
Esempio n. 4
0
        /// <summary>
        /// 添加消费记录
        /// </summary>
        /// <param name="rennteeIDCard"></param>
        /// <param name="ownerIDCard"></param>
        /// <param name="fee"></param>
        /// <param name="payType">0:微信,1:钱包</param>
        /// <returns></returns>
        public string AddBillLog(string rennteeIDCard, string ownerIDCard, string fee, string payType)
        {
            Dictionary <string, string> ret = new Dictionary <string, string>();

            try
            {
                string rate = ConfigurationManager.AppSettings["FeeRate"];
                string sql  = "Insert into sys_bill values ('" + Guid.NewGuid().ToString() + "','房费','" + rennteeIDCard + "','" + ownerIDCard + "','" + payType + "','0','" + DateTime.Now.ToString() + "','收入'," + fee + ")";
                MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
                decimal rateFee = 0;
                rateFee = decimal.Parse(fee) * decimal.Parse(rate);
                if (rateFee > 0)
                {
                    sql = "Insert into sys_bill values ('" + Guid.NewGuid().ToString() + "','平台手续费','" + ownerIDCard + "','云上之家服务平台','" + payType + "','1','" + DateTime.Now.ToString() + "','支出'," + rateFee.ToString() + ")";
                    MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
                }

                ret.Add("ret", "0");
                ret.Add("msg", "Success");
            }
            catch (Exception ex)
            {
                ret.Add("ret", "1");
                ret.Add("msg", ex.Message);
            }

            return(JSONHelper.ToJson(ret));
        }
Esempio n. 5
0
        public void DeleteCorporation(string rentNo)
        {
            StringBuilder sqlStr = new StringBuilder();

            sqlStr.Append("delete from  Rent_Rent where RentNo='" + rentNo + "'");
            MySQLHelper.ExecuteNonQuery(SqlConnString, MySQLHelper.CreateCommand(sqlStr.ToString()));
        }
Esempio n. 6
0
        public void UpdateRent(RentInfo rentInfo)
        {
            StringBuilder strSql = new StringBuilder();

            if (IsExistsRentNo(rentInfo.RentNo))
            {
                //Update
                strSql.Append("Update Rent_Rent set ");
                strSql.Append(" RDName='" + rentInfo.RDName + "',RSName='" + rentInfo.RSName + "',RRName='" + rentInfo.RRName + "',");
                strSql.Append(" RPSParentName = '" + rentInfo.RPSParentName + "', RPSName = '" + rentInfo.RPSName + "',RAddress='" + rentInfo.RAddress + "',RDoor='" + rentInfo.RDoor + "',");
                strSql.Append(" RTotalDoor='" + rentInfo.RTotalDoor + "',RRoomType='" + rentInfo.RRoomType + "',RDirection='" + rentInfo.RDirection + "',");
                strSql.Append(" RStructure='" + rentInfo.RStructure + "',RBuildingType='" + rentInfo.RBuildingType + "',RFloor='" + rentInfo.RFloor + "', ");
                strSql.Append(" RTotalFloor='" + rentInfo.RTotalFloor + "', RHouseAge='" + rentInfo.RHouseAge + "',RProperty='" + rentInfo.RProperty + "', ");
                strSql.Append(" RRentArea='" + rentInfo.RRentArea + "' ,RBuildArea='" + rentInfo.RBuildArea + "', ROwner='" + rentInfo.ROwner + "',");
                strSql.Append(" ROwnerTel='" + rentInfo.ROwnerTel + "' ,RIDCard='" + rentInfo.RIDCard + "', RLocationDescription='" + rentInfo.RLocationDescription + "',");
                strSql.Append(" RMapID='" + rentInfo.RMapID + "' ,RPSID='" + rentInfo.RPSID + "',");
                strSql.Append(" RModifiedBy='" + rentInfo.RModifiedBy + "',");
                strSql.Append(" RModifiedDate='" + rentInfo.RModifiedDate.Value.ToString("yyyy-MM-dd hh:mm:ss") + "',RRentType='" + rentInfo.RentType + "',ROwnType='" + rentInfo.OwnType + "'");
                strSql.Append(" where RentNo = '" + rentInfo.RentNo + "'");
                SysLogHelper.AddLog(rentInfo.RModifiedBy, "修改房源信息ID:" + rentInfo.RentNo, "修改-房源信息");
            }
            else
            {
                //Insert
                strSql.Append("Insert into Rent_Rent ([RentNO],[RDName],[RSName],[RRName]," +
                              "[RPSName],[RAddress],[RDoor],[RTotalDoor]," +
                              "[RRoomType],[RDirection],[RStructure],[RBuildingType]," +
                              "[RFloor] ,[RTotalFloor],[RHouseAge] ,[RProperty]," +
                              "[RRentArea],[RBuildArea],[ROwner],[ROwnerTel]," +
                              "[RIDCard],[RLocationDescription],[RMapID],[RPSID]," +
                              "[RCreatedBy],[RCreatedDate],[RModifiedBy]," +
                              "[RModifiedDate],[RPSParentName],[RRentType],[ROwntype],[IsAvailable],[IsObsoleted],[RentNumber]) values (");
                strSql.Append("'" + rentInfo.RentNo + "','" + rentInfo.RDName + "','" + rentInfo.RSName + "','" + rentInfo.RRName + "',");
                strSql.Append("'" + rentInfo.RPSName + "','" + rentInfo.RAddress + "','" + rentInfo.RDoor + "','" + rentInfo.RTotalDoor + "',");
                strSql.Append("'" + rentInfo.RRoomType + "','" + rentInfo.RDirection + "','" + rentInfo.RStructure + "','" + rentInfo.RBuildingType + "',");
                strSql.Append("'" + rentInfo.RFloor + "','" + rentInfo.RTotalFloor + "','" + rentInfo.RHouseAge + "','" + rentInfo.RProperty + "',");
                strSql.Append("'" + rentInfo.RRentArea + "','" + rentInfo.RBuildArea + "','" + rentInfo.ROwner + "','" + rentInfo.ROwnerTel + "',");
                strSql.Append("'" + rentInfo.RIDCard + "','" + rentInfo.RLocationDescription + "','" + rentInfo.RMapID + "','" + rentInfo.RPSID + "',");
                strSql.Append("'" + rentInfo.RCreatedBy + "','" + rentInfo.RCreatedDate.ToString("yyyy-MM-dd hh:mm:ss") + "','" + rentInfo.RCreatedBy + "',");
                strSql.Append("'" + rentInfo.RCreatedDate.ToString("yyyy-MM-dd hh:mm:ss") + "','" + rentInfo.RPSParentName + "','" + rentInfo.RentType + "','" + rentInfo.OwnType + "','" + rentInfo.IsAvailable + "','" + rentInfo.IsObsoleted + "','0'");
                strSql.Append(")");
                UpdateRentExternal(rentInfo);
                SysLogHelper.AddLog(rentInfo.RCreatedBy, "添加房源信息ID:" + rentInfo.RentNo, "添加-房源信息");
            }
            MySQLHelper.ExecuteNonQuery(SqlConnString, MySQLHelper.CreateCommand(strSql.ToString()));
            if (!string.IsNullOrEmpty(rentInfo.Longitude) && !string.IsNullOrEmpty(rentInfo.Latitude))
            {
                StringBuilder strSql1 = new StringBuilder();
                if (IsExistsMapInfo(rentInfo.RentNo))
                {
                    strSql1.Append("Update Rent_Map set Longitude='" + rentInfo.Longitude + "', Latitude='" + rentInfo.Latitude + "' where RentNO='" + rentInfo.RentNo + "'");
                }
                else
                {
                    strSql1.Append("Insert into Rent_Map values('" + rentInfo.RentNo + "', '" + rentInfo.Longitude + "', '" + rentInfo.Latitude + "')");
                }

                MySQLHelper.ExecuteNonQuery(SqlConnString, MySQLHelper.CreateCommand(strSql1.ToString()));
            }
        }
Esempio n. 7
0
        public void DeleteMessage(string msgId)
        {
            string guid = Guid.NewGuid().ToString();
            string sql  = "delete from t_web_text where wt_serial_id='" + msgId + "'";

            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 8
0
        public void InsertRelationShip(string userId, string region)
        {
            StringBuilder sqlStr = new StringBuilder();

            sqlStr.Append("insert into Rent_user_dept_relationship values ('" + Guid.NewGuid().ToString() + "'," + userId + ",'" + region + "','1','')");
            MySQLHelper.ExecuteNonQuery(SqlConnString, MySQLHelper.CreateCommand(sqlStr.ToString()));
        }
Esempio n. 9
0
        public string GetIOLetInfos()
        {
            Dictionary <string, string> kv = new Dictionary <string, string>();

            kv.Add("ResourceId", "iolets");
            kv.Add("RequestId", "EBA1001S");
            //kv.Add("Host", "http://qxw2332340157.my3w.com");
            kv.Add("Token", "TJ_TIANTAJ_PS");
            string retStr = LigerRM.Common.WebRequestHelper.WebRequestPoster.GetJson(IOLET_URL, kv);
            Dictionary <string, string> ret = new Dictionary <string, string>();

            ret = JSONHelper.FromJson <Dictionary <string, string> >(retStr);
            if (ret["rsc"].ToString() == "200")
            {
                string sql = "delete from Motor_IOLetInfo";
                MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
                IOLets[] partRet = JSONHelper.FromJson <IOLets[]>(ret["iolets"]);
                foreach (IOLets io in partRet)
                {
                    sql = "Insert into Motor_IOLetInfo values ('" + io.id + "','" + io.name + "','" + io.parklot + "','" + DateTime.Now.ToString() + "','')";
                    MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
                }
            }

            return(retStr);
        }
Esempio n. 10
0
        public void AddLockLog(string deviceId, string action)
        {
            string id  = Guid.NewGuid().ToString();
            string sql = "insert into Rent_Lock_Logs values ('" + id + "','" + deviceId + "','" + action + "','" + DateTime.Now.ToString() + "','')";

            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 11
0
        public string DeleteBanner(long BannerId)
        {
            ReturnJosn Return = new ReturnJosn();

            try
            {
                StringBuilder str = new StringBuilder();
                str.Append("DELETE AppHome_Banner WHERE BannerId=" + BannerId);
                int count = MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(str.ToString()));
                if (count > 0)
                {
                    Return.Code = "0";
                    Return.Msg  = "删除成功!!!";
                }
                else
                {
                    Return.Code = "1";
                    Return.Msg  = "删除失败!!!";
                }
                return(JSONHelper.ToJson(Return));
            }
            catch (Exception ex)
            {
                Return.Code = "1";
                Return.Msg  = "操作失败,出现系统异常!";
                return(JSONHelper.ToJson(Return));
            }
        }
Esempio n. 12
0
        public void UpdateAttachment(AttachmentInfo attachInfo)
        {
            StringBuilder sqlStr = new StringBuilder();

            if (attachInfo.AttachmentID.HasValue) //update
            {
            }
            else //Insert
            {
                sqlStr.Append("Insert into t_signet_attachment values(@sa_signet_id,@sa_title,@file,@sa_demo,@sa_date)");
                SqlParameter[] parameters =
                {
                    new SqlParameter("@sa_signet_id", SqlDbType.VarChar,  13),
                    new SqlParameter("@sa_title",     SqlDbType.VarChar, 100),
                    new SqlParameter("@file",         SqlDbType.Image),
                    new SqlParameter("@sa_demo",      SqlDbType.VarChar, 500),
                    new SqlParameter("@sa_date",      SqlDbType.DateTime)
                };
                parameters[0].Value = attachInfo.SignetID;
                parameters[1].Value = attachInfo.Title;
                parameters[2].Value = attachInfo.FileInfo;
                parameters[3].Value = attachInfo.AttachmentDemo;
                parameters[4].Value = DateTime.Now;
                MySQLHelper.ExecuteNonQuery(SqlConnString, MySQLHelper.CreateCommand(sqlStr.ToString(), parameters));
            }
        }
Esempio n. 13
0
        public void DeleteAttachment(string attachmentId)
        {
            StringBuilder sqlStr = new StringBuilder();

            sqlStr.Append("Delete from t_signet_attachment where sa_attachment_id=" + attachmentId);
            MySQLHelper.ExecuteNonQuery(SqlConnString, MySQLHelper.CreateCommand(sqlStr.ToString()));
        }
Esempio n. 14
0
        //增加一键开锁的log日志  SDK
        public void AddLockNewSDKLog(string deviceId, string action, string meno, string userId)
        {
            string id  = Guid.NewGuid().ToString();
            string sql = "insert into Enterprise_OpenDoor_Log values ('" + id + "', '" + userId + "', '" + deviceId + "','" + meno + "','" + DateTime.Now.ToString() + "','','','','','" + action + "')";

            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 15
0
        public void UpdateMessage(string title, string content, string id)
        {
            string guid = Guid.NewGuid().ToString();
            string sql  = "update t_web_text set wt_title='" + title + "',wt_text='" + content + "' where wt_serial_id='" + id + "'";

            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 16
0
        public void DeleteRelationShip(string userId)
        {
            StringBuilder sqlStr = new StringBuilder();

            sqlStr.Append("delete from Rent_user_dept_relationship where t_wu_user_id=" + userId);
            MySQLHelper.ExecuteNonQuery(SqlConnString, MySQLHelper.CreateCommand(sqlStr.ToString()));
        }
Esempio n. 17
0
        public void UploadPersonInfo(string id, string motorNo)
        {
            //type: 0-出租屋,1-印章系统,2-车辆
            string sql = "insert into T_Person_Info values ('" + Guid.NewGuid().ToString() + "','" + id + "','" + motorNo + "','" + motorNo + "','2','" + DateTime.Now.ToString() + "','0','','RZF','天津市河西区天塔街环湖南里','120004056','120004056','0','','')";

            MySQLHelper.ExecuteNonQuery(MySQLHelper.DataSynConnectionString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 18
0
        public void AddEvaluate(Evaluate info)
        {
            string sql = "insert into dbo.Rent_Evaluate values ('" + info.EvaluateID + "','" + info.EvaluateObject + "','" + info.EvaluateType +
                         "','" + DateTime.Now.ToString() + "'," + (info.EvaluateItem0.HasValue ? info.EvaluateItem0.Value.ToString() : "null") + "," + (info.EvaluateItem1.HasValue?info.EvaluateItem1.Value.ToString():"null") + ","
                         + (info.EvaluateItem2.HasValue?info.EvaluateItem2.Value.ToString():"null") + "," + (info.EvaluateItem3.HasValue?info.EvaluateItem3.Value.ToString():"null") + "," + (info.EvaluateItem4.HasValue?info.EvaluateItem4.Value.ToString():"null") + ",'" + info.EvaluatePerson + "','" + info.EvaluateDesc + "')";

            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 19
0
        public void UpdateRentExternal(string rentNO, string desc)
        {
            string sql = "delete from Rent_External where Rent_NO='" + rentNO + "'";

            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));

            sql = "insert into Rent_External values ('" + rentNO + "','" + desc + "')";
            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 20
0
        public void UploadPersonInfo(RentAttribute info)
        {
            //type: 0-出租屋,1-印章系统
            RentInfo rent = new RentInfo(info.RentNo);

            string sql = "insert into T_Person_Info values ('" + Guid.NewGuid().ToString() + "','" + info.RRAID.ToString() + "','" + info.RRAContactName + "','" + info.RRAIDCard + "','0','" + DateTime.Now.ToString() + "','0','','RZF','" + rent.RAddress + "','" + rent.RPSName + "','" + rent.RPSName + "','0','','')";

            MySQLHelper.ExecuteNonQuery(MySQLHelper.DataSynConnectionString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 21
0
        private void TransferData(XmlNode xn)
        {
            foreach (XmlNode n in xn.ChildNodes)
            {
                XmlElement xe        = (XmlElement)n;
                string     tableName = xe.GetAttribute("Name").ToString();
                string     key       = xe.GetAttribute("Key").ToString();
                string     keyType   = xe.GetAttribute("KeyType").ToString();
                string     optType   = xe.GetAttribute("OptType").ToString();
                string     keyValue  = xe.GetAttribute("KeyValue").ToString();

                string    sql = string.Empty;
                DataTable dt  = GetTableStructure(tableName);
                //tableName += "_test";
                switch (optType)
                {
                case "0":     //insert
                    sql = "insert into " + tableName + " ";
                    string columnStr = "(";
                    string valueStr  = "values(";
                    foreach (DataRow r in dt.Rows)
                    {
                        columnStr += r["COLUMN_NAME"].ToString() + ",";
                        valueStr  += FormatValuesByType(r["DATA_TYPE"].ToString(), n.SelectSingleNode(r["COLUMN_NAME"].ToString()).InnerText) + ",";
                    }
                    columnStr = columnStr.Substring(0, columnStr.Length - 1) + ") ";
                    valueStr  = valueStr.Substring(0, valueStr.Length - 1) + ") ";
                    sql       = sql + columnStr + valueStr;
                    break;

                case "1":
                    sql       = "update " + tableName + " set ";
                    columnStr = "";
                    foreach (DataRow r in dt.Rows)
                    {
                        if (!r["COLUMN_NAME"].ToString().ToLower().Equals(key.ToLower()))
                        {
                            columnStr += r["COLUMN_NAME"].ToString() + "=" + FormatValuesByType(r["DATA_TYPE"].ToString(), n.SelectSingleNode(r["COLUMN_NAME"].ToString()).InnerText) + ",";
                        }
                    }
                    columnStr = columnStr.Substring(0, columnStr.Length - 1);
                    sql       = sql + columnStr + " where " + key + "=" + FormatValuesByType(keyType, keyValue);
                    break;

                case "2":
                    sql = "delete from " + tableName + " where " + key + "=" + FormatValuesByType(keyType, keyValue);
                    break;
                }

                MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
            }
        }
Esempio n. 22
0
        public void DeleteICCard(string id)
        {
            string    sql = "select * from Rent_Locks_ICCards where ID=" + id;
            DataTable dt  = MySQLHelper.ExecuteDataset(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql)).Tables[0];

            sql = "update Rent_Locks_ICCards set IsValid='0' where ID=" + id;
            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
            string s = string.Empty;

            LockServices.IhzbAttenServiceservice client = new LockServices.IhzbAttenServiceservice();
            string str = dt.Rows[0]["LockID"].ToString().PadRight(16, ' ') + dt.Rows[0]["ICCard"].ToString().PadRight(10, ' ') + s.PadRight(18, ' ') + s.PadRight(13, ' ') + s.PadRight(6, ' ') + DateTime.Parse(dt.Rows[0]["StartDate"].ToString()).ToString("yyyyMMddHHmm").Substring(2, 10) + DateTime.Parse(dt.Rows[0]["EndDate"].ToString()).ToString("yyyyMMddHHmm").Substring(2, 10) + "2";
            string ret = client.hzb_SetPassengerInfo(99, "02500262", str);
        }
Esempio n. 23
0
        public void UpdateCorporation(CorporationInfo corpInfo)
        {
            StringBuilder strSql = new StringBuilder();

            if (IsExists(corpInfo.CorpID))
            {
                //Update
                strSql.Append("Update t_corporation set ");
                strSql.Append(" co_corp_name='" + corpInfo.CorpName + "',co_sort_id='" + corpInfo.SortID + "',co_alias_name='" + corpInfo.AliasName + "',");
                strSql.Append(" co_full_name = '" + corpInfo.FullName + "',co_corp_class='" + corpInfo.CorpClass + "',co_type='" + corpInfo.CorpType + "',");
                strSql.Append(" co_area_id='" + corpInfo.AreaID.Trim() + "',co_boss='" + corpInfo.BossName + "',co_boss_idcard='" + corpInfo.BossIDCard + "',");
                strSql.Append(" co_address='" + corpInfo.Address + "',co_linker='" + corpInfo.Linker + "',co_link_way='" + corpInfo.LinkWay + "', ");
                strSql.Append(" co_post_code='" + corpInfo.PostCode + "', co_tax_no='" + corpInfo.TaxNo + "',co_account_no='" + corpInfo.AccountNo + "', ");
                strSql.Append(" co_password='******' ,co_other_no='" + corpInfo.OtherNo + "', co_creator='" + corpInfo.Creator + "',");
                strSql.Append(" co_create_date='" + corpInfo.CreateDate.ToString("yyyy-MM-dd hh:mm:ss") + "' ,co_who_cancel='" + corpInfo.Canceller + "',");
                if (corpInfo.CancelDate.HasValue)
                {
                    strSql.Append(" co_cancel_date ='" + corpInfo.CancelDate.Value.ToString() + "',");
                }
                else
                {
                    strSql.Append(" co_cancel_date = null,");
                }
                strSql.Append(" co_cancel_type='" + corpInfo.CancelType + "' ,co_cancel_reason='" + corpInfo.CancelReason + "',co_status='" + corpInfo.Status + "' ,");
                strSql.Append(" co_memo='" + corpInfo.Memo + "' ,co_biz_id='" + corpInfo.BizNo + "'");
                strSql.Append(" where co_corp_id = '" + corpInfo.CorpID + "'");
                SysLogHelper.AddLog(corpInfo.Creator, "修改企业信息ID:" + corpInfo.CorpID, "修改-企业信息");
            }
            else
            {
                //Insert
                strSql.Append("Insert into t_corporation values (");
                strSql.Append("'" + corpInfo.CorpID + "','" + corpInfo.CorpName + "','" + corpInfo.SortID + "','" + corpInfo.AliasName + "','" + corpInfo.FullName + "',");
                strSql.Append("'" + corpInfo.CorpClass + "','" + corpInfo.CorpType + "','" + corpInfo.AreaID + "','" + corpInfo.BossName + "','" + corpInfo.BossIDCard + "',");
                strSql.Append("'" + corpInfo.Address + "','" + corpInfo.PostCode + "','" + corpInfo.Linker + "','" + corpInfo.LinkWay + "','" + corpInfo.TaxNo + "',");
                strSql.Append("'" + corpInfo.AccountNo + "','" + corpInfo.OtherNo + "','" + corpInfo.PassWord + "','" + corpInfo.Creator + "','" + corpInfo.CreateDate.ToString("yyyy-MM-dd hh:mm:ss") + "',");
                if (corpInfo.CancelDate.HasValue)
                {
                    strSql.Append("'" + corpInfo.Canceller + "','" + corpInfo.CancelDate.Value.ToString("yyyy-MM-dd hh:mm:ss") + "',");
                }
                else
                {
                    strSql.Append("'" + corpInfo.Canceller + "',null,");
                }
                strSql.Append("'" + corpInfo.CancelType + "','" + corpInfo.CancelReason + "','" + corpInfo.Status + "','" + corpInfo.Memo + "','" + corpInfo.BizNo + "'");
                strSql.Append(")");
                UpdateCorporationID(corpInfo.Region, corpInfo.RegionName);
                SysLogHelper.AddLog(corpInfo.Creator, "添加企业信息ID:" + corpInfo.CorpID, "添加-企业信息");
            }
            MySQLHelper.ExecuteNonQuery(SqlConnString, MySQLHelper.CreateCommand(strSql.ToString()));
        }
Esempio n. 24
0
        public void AddMessage(string title, string content, string reporter, string carveIds)
        {
            string guid = Guid.NewGuid().ToString();
            string sql  = "insert into t_web_text values ('" + guid + "','" + title + "','" + content + "','" + DateTime.Now.ToString() + "','" + reporter + "','A')";

            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
            if (!string.IsNullOrEmpty(carveIds))
            {
                foreach (string s in carveIds.Split(','))
                {
                    sql = "insert into t_web_text_relationship values ('" + Guid.NewGuid().ToString() + "','" + guid + "','" + s + "',0,null)";
                    MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
                }
            }
        }
Esempio n. 25
0
        public void UpdateRentExternal(RentInfo rentInfo, bool isService)
        {
            string    sql = "select * from Rent_External where rent_No='" + rentInfo.RentNo + "'";
            DataTable dt  = MySQLHelper.ExecuteDataset(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql)).Tables[0];

            if (dt.Rows.Count > 0)
            {
                sql = "update Rent_External set HZHouseID='" + rentInfo.RHouseID.ToString() + "',HZRentID='" + rentInfo.RRentID + "',HZUploadDate='" + DateTime.Now.ToString() + "',RentRealOwner='" + rentInfo.RRealOwner + "',RentRealOwnerID='" + rentInfo.RRealIDCard + "',RentRealOwnerPhone='" + rentInfo.RRealOwnerTel + "' where rent_No='" + rentInfo.RentNo + "'";
            }
            else
            {
                sql = "insert into Rent_External values ('" + rentInfo.RentNo + "','','" + rentInfo.RHouseID + "','" + rentInfo.RRentID + "','" + DateTime.Now.ToString() + "','" + rentInfo.ROwner + "','" + rentInfo.RIDCard + "','" + rentInfo.ROwnerTel + "')";
            }
            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 26
0
        public void UpdateRentExternal(RentInfo rentInfo)
        {
            string    sql = "select * from Rent_External where rent_No='" + rentInfo.RentNo + "'";
            DataTable dt  = MySQLHelper.ExecuteDataset(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql)).Tables[0];

            if (dt.Rows.Count > 0)
            {
                sql = "insert into Rent_External values ('" + rentInfo.RentNo + "','','" + rentInfo.RHouseID + "','" + rentInfo.RRentID + "','" + DateTime.Now.ToString() + "','" + rentInfo.ROwner + "','" + rentInfo.RIDCard + "','" + rentInfo.ROwnerTel + "')";
            }
            else
            {
                sql = "insert into Rent_External values ('" + rentInfo.RentNo + "','','','',null,'" + rentInfo.ROwner + "','" + rentInfo.RIDCard + "','" + rentInfo.ROwnerTel + "')";
            }
            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 27
0
        public void ExpiredOrders()
        {
            string    sql = "select * from dbo.Rent_RentAttribute where rrastatus='1' or rrastatus='0'";
            DataTable dt  = MySQLHelper.ExecuteDataset(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql)).Tables[0];

            foreach (DataRow row in dt.Rows)
            {
                DateTime createdOn = DateTime.Parse(row["RRACreatedDate"].ToString());
                if (createdOn.AddMinutes(20) < DateTime.Now)
                {
                    sql = "update Rent_RentAttribute set RRAStatus='" + ((int)RentAttributeHelper.AttributeStatus.Expired).ToString() + "' where RRAID=" + row["RRAID"].ToString();
                    MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
                }
            }
        }
Esempio n. 28
0
        public void UpdateExternalInfo(RentAttribute info)
        {
            string    sql = "select * from Rent_RentAttribute_External where RRAID=" + info.RRAID.ToString();
            DataTable dt  = MySQLHelper.ExecuteDataset(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql)).Tables[0];

            if (dt.Rows.Count > 0)
            {
                sql = "Update Rent_RentAttribute_External set HZTenantID='" + info.TenantID + "' where RRAID=" + info.RRAID.ToString();
            }
            else
            {
                sql = "Insert into Rent_RentAttribute_External values (" + info.RRAID.ToString() + ",'" + info.TenantID + "','" + DateTime.Now.ToString() + "')";
            }
            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
        }
Esempio n. 29
0
        public void DeletePassword(string id)
        {
            string sql = "update Rent_Locks_Password set IsValid='0' where ID=" + id;

            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));

            sql = "select * from Rent_Locks_Password where ID=" + id;
            DataTable dt = MySQLHelper.ExecuteDataset(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql)).Tables[0];
            string    s  = string.Empty;

            if (dt.Rows.Count > 0)
            {
                UpdatePassengerInfoToDevice(dt.Rows[0]["LockID"].ToString(), "", "", "", dt.Rows[0]["Password"].ToString().Trim(), DateTime.Parse(dt.Rows[0]["StartDate"].ToString()).ToString("yyyyMMddHHmm").Substring(2, 10), DateTime.Parse(dt.Rows[0]["EndDate"].ToString()).ToString("yyyyMMddHHmm").Substring(2, 10), "4");
                AddLockLog(dt.Rows[0]["Password"].ToString(), "Freeze");
            }
        }
Esempio n. 30
0
        public void UpdateMonitorMotor(MonitorMotorInfo info)
        {
            string endDate = string.Empty;

            if (info.EndDate.HasValue)
            {
                endDate = "'" + info.EndDate.ToString() + "'";
            }
            else
            {
                endDate = "null";
            }
            string sql = "update Rent_Motor_Monitor set MotorNO='" + info.MotorNO + "',StartDate='" + info.StartDate.ToString() + "',EndDate=" + endDate + ",MotorType='" + info.MotorType + "',Status='" + info.Status + "' where ID='" + info.ID + "'";

            MySQLHelper.ExecuteNonQuery(MySQLHelper.SqlConnString, MySQLHelper.CreateCommand(sql));
        }