Ejemplo n.º 1
0
        public static string InitRemark(string rcode)
        {
            string              r   = "";
            Sys_Remark          sr  = new Sys_Remark();
            Sys_RemarkBll       srb = new Sys_RemarkBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                Sys_Remark csr = srb.Query(" and rcode='" + rcode + "'");
                if (csr != null)
                {
                    r = js.Serialize(csr);
                }
                else
                {
                    sr.rname = "";
                    sr.rcode = srb.CreateCode().ToString().PadLeft(4, '0');
                    sr.id    = 0;
                    r        = js.Serialize(sr);
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Ejemplo n.º 2
0
        public static string CheckInvRemark(string icode)
        {
            string r               = "";
            string ccode           = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                ccode = srb.GetProductionBz(icode);
                if (ccode != "")
                {
                    Sys_Remark scc = srb.Query(" and rcode='" + ccode + "'");
                    if (scc != null)
                    {
                        r = scc.rchangtext;
                    }
                    else
                    {
                        r = "";
                    }
                }
                else
                {
                    r = "";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Ejemplo n.º 3
0
        public static string CustSaveRemark(string bcode, string bid, string bname, string changebz, string context)
        {
            string              r   = "";
            Sys_RemarkBll       srb = new Sys_RemarkBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                Sys_Remark sr = new Sys_Remark();
                sr.rname      = bname;
                sr.rcode      = bcode;
                sr.rchangtext = changebz;
                sr.rfixtext   = context;
                sr.cdate      = DateTime.Now.ToString();
                sr.maker      = iv.u.ename;
                sr.dcode      = iv.u.dcode.Substring(0, 8);
                if (bid == "0")
                {
                    if (!srb.Exists(" and rname='" + bname + "'"))
                    {
                        if (srb.Add(sr) > 0)
                        {
                            r = "S";
                        }
                        else
                        {
                            r = "F";
                        }
                    }
                    else
                    {
                        r = "T";
                    }
                }
                else
                {
                    if (!srb.Exists(" and rname='" + bname + "' and rcode<>'" + bcode + "'"))
                    {
                        if (srb.Update(sr))
                        {
                            r = "S";
                        }
                        else
                        {
                            r = "F";
                        }
                    }
                    else
                    {
                        r = "T";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }