예제 #1
0
        public static string SaveTBackEvent(string htbcode, string htbname, string htcode, string thid, string htname,
                                            string htsort, string htsource, string htsql, string htstate)
        {
            string              r   = "";
            Sys_BackEventBll    sbb = new Sys_BackEventBll();
            Sys_BackEvent       sb  = new Sys_BackEvent();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                sb.bcode  = htbcode;
                sb.bname  = htbname;
                sb.ename  = htname;
                sb.ecode  = htcode;
                sb.esort  = htsort;
                sb.source = htsource;
                sb.ebody  = htsql;
                sb.estate = htstate;
                if (thid == "0")
                {
                    if (sbb.Add(sb) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (sbb.Update(sb))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
예제 #2
0
        public static string SaveBackEvent(string hbcode, string hbname, string hbstate, string hcode, string hid, string hname, string hsql, string hsort, string hsoure)
        {
            string              r   = "";
            Sys_BackEventBll    sbb = new Sys_BackEventBll();
            Sys_BackEvent       sb  = new Sys_BackEvent();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                sb.bcode  = hcode;
                sb.bname  = hname;
                sb.ename  = hbname;
                sb.ecode  = hbcode;
                sb.esort  = hsort;
                sb.source = hsoure;
                sb.ebody  = hsql.Replace("\n", " ");
                sb.estate = hbstate;
                if (hid == "0")
                {
                    if (sbb.Add(sb) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (sbb.Update(sb))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }