Пример #1
0
    public string fnDeletes(Company company, string sIP, string sId)
    {
        string sSql = " UPDATE [dbo].[MNDTcompany] " +
                      "       SET [status] = 'D' " +
                      " WHERE [company_id] IN (" + company.company_id + ")";
        CompanyTran companyTran = new CompanyTran();

        companyTran.CompanyId(company.company_id)
        .IP(sIP)
        .Status("D")
        .CreateId(sId);
        sSql += fnInsertsSql(companyTran);

        return(PublicApi.fnExecuteSQL(sSql, "MNDT"));
    }
Пример #2
0
    public string fnUpdate(Company company, string sIP, string sId)
    {
        string sSql =
            "  UPDATE [dbo].[MNDTcompany]  " +
            "     SET [tax_id] = '" + company.tax_id + "'  " +
            "        ,[name] = '" + company.name + "'  " +
            "        ,[email] = '" + company.email + "'  " +
            "        ,[address] = '" + company.address + "'  " +
            "        ,[pay] = '" + company.pay + "'  " +
            "        ,[phone] = '" + company.phone + "'  " +
            "        ,[tel] = '" + company.tel + "'  " +
            "        ,[description] = '" + company.description + "'  " +
            "        ,[status] = '" + company.status + "'  " +
            "  WHERE [company_id] = '" + company.company_id + "' ";
        CompanyTran companyTran = new CompanyTran();

        companyTran.CompanyId(company.company_id)
        .IP(sIP)
        .Status("M")
        .CreateId(sId);
        sSql += fnInsertSql(companyTran);

        return(PublicApi.fnExecuteSQL(sSql, "MNDT"));
    }