Exemplo n.º 1
0
    public bool InsertNewRoleCode(string role,
                                  string codeid, string codedesc, int actFlag, DateTime dtTmStmp)
    {
        role = "worole";
        WorkOrder.codesDataTable RoleCodes = new WorkOrder.codesDataTable();
        WorkOrder.codesRow       RoleCode  = RoleCodes.NewcodesRow();

        RoleCode.code_id   = codeid;
        RoleCode.code_type = role;

        if (codedesc == null)
        {
            RoleCode.Setcode_descNull();
        }
        else
        {
            RoleCode.code_desc = codedesc;
        }

        //if (actFlag == null) RoleCode.Setcode_ActiveFlagNull();
        //else
        RoleCode.code_ActiveFlag = actFlag;

        RoleCode.code_Date = DateTime.Today;

        RoleCodes.AddcodesRow(RoleCode);
        int rowsAffected = CodesAdapter.Update(RoleCodes);

        return(rowsAffected == 1);
    }
Exemplo n.º 2
0
    public bool InsertNewPhaseStatus(string phase,
                                     string codeid, string codedesc, int actFlag, DateTime dtTmStmp)
    {
        phase = "wostat";
        WorkOrder.codesDataTable PhaseStatusCodes = new WorkOrder.codesDataTable();
        WorkOrder.codesRow       PhaseStatus      = PhaseStatusCodes.NewcodesRow();

        PhaseStatus.code_id   = codeid;
        PhaseStatus.code_type = phase;

        if (codedesc == null)
        {
            PhaseStatus.Setcode_descNull();
        }
        else
        {
            PhaseStatus.code_desc = codedesc;
        }

        //if (actFlag == null) PhaseStatus.Setcode_ActiveFlagNull();
        //else
        PhaseStatus.code_ActiveFlag = actFlag;

        PhaseStatus.code_Date = DateTime.Today;

        PhaseStatusCodes.AddcodesRow(PhaseStatus);
        int rowsAffected = CodesAdapter.Update(PhaseStatusCodes);

        return(rowsAffected == 1);
    }
Exemplo n.º 3
0
    public bool InsertNewProjectCode(string project,
                                     string codeid, string codedesc, int actFlag, DateTime dtTmStmp)
    {
        project = "woproj";
        WorkOrder.codesDataTable ProjectCodes = new WorkOrder.codesDataTable();
        WorkOrder.codesRow       ProjectCode  = ProjectCodes.NewcodesRow();

        ProjectCode.code_id   = codeid;
        ProjectCode.code_type = project;

        if (codedesc == null)
        {
            ProjectCode.Setcode_descNull();
        }
        else
        {
            ProjectCode.code_desc = codedesc;
        }

        //if (actFlag == null) ProjectCode.Setcode_ActiveFlagNull();
        //else
        ProjectCode.code_ActiveFlag = actFlag;

        ProjectCode.code_Date = DateTime.Today;

        ProjectCodes.AddcodesRow(ProjectCode);
        int rowsAffected = CodesAdapter.Update(ProjectCodes);

        return(rowsAffected == 1);
    }