Exemple #1
0
        /// <summary>
        /// 五险一金列表
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETWXYJLIST(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string userName = UserInfo.User.UserName;
            string strWhere = " 1=1 and ComId=" + UserInfo.User.ComId;

            DataTable dt = new DataTable();

            dt = new SZHL_GZGL_WXYJB().GetDTByCommand("select * from SZHL_GZGL_WXYJ where comid ='" + UserInfo.User.ComId + "'");
            if (dt.Rows.Count != 6)
            {
                dt = new SZHL_GZGL_WXYJB().GetDTByCommand(@"select * from ( select '养老保险' as name1 ) as a left join SZHL_GZGL_WXYJ as b on a.name1=b.Name and b.comid ='" + UserInfo.User.ComId + "' union "
                                                          + " select * from ( select '医疗保险' as name1 ) as a left join SZHL_GZGL_WXYJ as b on a.name1=b.Name and b.comid ='" + UserInfo.User.ComId + "' union "
                                                          + " select * from ( select '失业保险' as name1 ) as a left join SZHL_GZGL_WXYJ as b on a.name1=b.Name and b.comid ='" + UserInfo.User.ComId + "' union "
                                                          + " select * from ( select '工伤保险' as name1 ) as a left join SZHL_GZGL_WXYJ as b on a.name1=b.Name and b.comid ='" + UserInfo.User.ComId + "' union "
                                                          + " select * from ( select '生育保险' as name1 ) as a left join SZHL_GZGL_WXYJ as b on a.name1=b.Name and b.comid ='" + UserInfo.User.ComId + "' union "
                                                          + " select * from ( select '公积金' as name1 ) as a left join SZHL_GZGL_WXYJ as b on a.name1=b.Name and b.comid ='" + UserInfo.User.ComId + "'");
                foreach (DataRow dr in dt.Rows)
                {
                    dr["Name"] = dr["name1"];
                    if (dr["ID"] == null || dr["ID"].ToString() == "")
                    {
                        dr["ID"] = "0";
                    }
                }

                dt.Columns.Remove("name1");
            }

            msg.Result = dt;
        }
Exemple #2
0
        /// <summary>
        /// 添加五险一金
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1">客户信息</param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void ADDWXYJ(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            if (!string.IsNullOrEmpty(P1))
            {
                List <SZHL_GZGL_WXYJ> tdList = JsonConvert.DeserializeObject <List <SZHL_GZGL_WXYJ> >(P1);

                foreach (var l in tdList)
                {
                    var wxyj = new SZHL_GZGL_WXYJB().GetEntities(p => p.ComId == UserInfo.User.ComId && p.Name == l.Name).FirstOrDefault();
                    if (wxyj == null)
                    {
                        l.ComId  = UserInfo.User.ComId;
                        l.CRDate = DateTime.Now;
                        l.CRUser = UserInfo.User.UserName;
                        new SZHL_GZGL_WXYJB().Insert(l);
                    }
                    else
                    {
                        wxyj.Base  = l.Base;
                        wxyj.ComBL = l.ComBL;
                        wxyj.PerBL = l.PerBL;
                        new SZHL_GZGL_WXYJB().Update(wxyj);
                    }
                }
            }
        }
Exemple #3
0
        /// <summary>
        /// 获取五险一金信息
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETWXYJMODEL(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int            Id   = int.Parse(P1);
            SZHL_GZGL_WXYJ ccxj = new SZHL_GZGL_WXYJB().GetEntity(d => d.ID == Id);

            msg.Result = ccxj;
            if (ccxj != null)
            {
                if (!string.IsNullOrEmpty(ccxj.Files))
                {
                    msg.Result2 = new FT_FileB().GetEntities(" ID in (" + ccxj.Files + ")");
                }

                //new JH_Auth_User_CenterB().ReadMsg(UserInfo, ccxj.ID, "CCXJ");
            }
        }